Support » Plugin: WordPress Access Control » PHP Notices

  • Hi, I’m submitting this separately from PHP 7 information, FWIW.

    PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; WPAC_Nav_Menu_Widget has a deprecated constructor in [path redacted]/wp-content/plugins/wordpress-access-control/default-widgets.php on line 25

    PHP Notice: The called constructor method for WP_Widget in WPAC_Nav_Menu_Widget is deprecated since version 4.3.0! Use

    __construct()

    instead. in [path redacted]/wp-includes/functions.php on line 3902

Viewing 1 replies (of 1 total)
  • We are having the same issues.

    This plugin uses PHP4 coding standards for widgets. I have made changes to the plugin as per your error message above.

    Within “default-widgets.php” lines 25 – 30 should be changed as follows:

    function __construct()
    {
    $widget_ops = array( ‘description’ => __(‘Use this widget to add one of your custom menus as a widget.’) );
    parent::__construct( ‘nav_menu’, __(‘Custom Menu’), $widget_ops );

    Of course with all changes run this under a development environment first to ensure that it resolves your issue before moving to live

Viewing 1 replies (of 1 total)
  • The topic ‘PHP Notices’ is closed to new replies.