Issue with capability
-
There is a deprecated notice for the capability that is being used in
add_menu_page().8is not a valid capability.add_menu_page(__('WhatsHelp', 'whatshelp'), __('WhatsHelp', 'whatshelp'), 8, basename(__FILE__), 'whatshelp_settings', plugin_dir_url(__FILE__) . 'img/wh-icon.ico');By changing the capability to “manage_options” fixes the PHP notices.
add_menu_page(__('WhatsHelp', 'whatshelp'), __('WhatsHelp', 'whatshelp'), 'manage_options', basename(__FILE__), 'whatshelp_settings', plugin_dir_url(__FILE__) . 'img/wh-icon.ico');https://developer.wordpress.org/reference/functions/add_menu_page/
Thank you for fixing this in the next version.
The topic ‘Issue with capability’ is closed to new replies.