• In yd-wpmu-sitewide-options.php method yd_wpmuso_menu() you’re calling:

    add_options_page(
    	__('YD Network-wide Options',
    		'yd-wpmuso'),
    	__('YD Network-wide Options', 'yd-wpmuso'),
    	8,
    	__FILE__,
    		'yd_wpmuso_options'
    		);

    When WP_DEBUG is on this results in the PHP warning:
    Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /path/to/wp-includes/functions.php on line 2722

    As per the documentation the third argument should be a capability – in your case probably manage_options?

    Replace your above code with the following and you should be good to go:

    function yd_wpmuso_menu() {
    	add_options_page(
    		__('YD Network-wide Options', 'yd-wpmuso'),
    		__('YD Network-wide Options', 'yd-wpmuso'),
    		'manage_options',
    		__FILE__,
    		'yd_wpmuso_options'
    	);
    }

    https://www.ads-software.com/extend/plugins/yd-wpmu-sitewide-options/

  • The topic ‘[PATCH] Deprecated use of add_options_page’ is closed to new replies.