i have got this error :
add_object_page is deprecated since version 4.5 . Use add_menu_page()
in file:ps-taxonomy-expander.php
line : 534
function add_taxonomy_order_menu() {
$hook = add_object_page( __( 'Term order', 'ps-taxonomy-expander' ), __( 'Term order', 'ps-taxonomy-expander' ), 'manage_categories', basename( __FILE__ ), array( $this, 'term_order_page' ) );
add_action( 'admin_print_styles-' . $hook, array( $this, 'term_order_style' ) );
add_action( 'admin_print_scripts-' . $hook, array( $this, 'term_order_scripts' ) );
}
How to fix it ?
https://www.ads-software.com/plugins/ps-taxonomy-expander/
]]>With update to WP 4.5 I get the message in my debug log that ‘add_object_page’ is deprecated and you should use ‘add_menu_page’ instead.
In index.php at line 69 – 72 you have the following code snippet:
if (!function_exists("add_object_page") || $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["menu_group"])
$my_admin_page = add_menu_page($pageTitle, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function, $GOTMLS_Full_plugin_logo_URL);
else
$my_admin_page = add_object_page($pageTitle, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function, $GOTMLS_Full_plugin_logo_URL);
wich could be changed to:
if (function_exists("add_menu_page") || $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["menu_group"])
$my_admin_page = add_menu_page($pageTitle, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function, $GOTMLS_Full_plugin_logo_URL);
else
$my_admin_page = add_object_page($pageTitle, $pluginTitle, $GLOBALS["GOTMLS"]["tmp"]["settings_array"]["user_can"], $base_page, $base_function, $GOTMLS_Full_plugin_logo_URL);
in order to avoid the entry in the debug log. Would that be an option for future updates?
Cheers,
Stefan
https://www.ads-software.com/plugins/gotmls/
]]>Notice: add_object_page is deprecated since version 4.5! Use add_menu_page() instead. in www/wp-includes/functions.php on line 3662
The problem located in plugins/newsletter/plugin.php at line 332
add_object_page('Newsletter', 'Newsletter', ($this->options['editor'] == 1) ? 'manage_categories' : 'manage_options', 'newsletter_main_index', '', plugins_url('newsletter') . '/images/menu-icon.png');
https://www.ads-software.com/plugins/newsletter/
]]>add_object_page to add_menu_page()
add_utility_page to add_menu_page()
https://www.ads-software.com/plugins/menu-swapper/
]]>Notice: add_object_page is deprecated since version 4.5! Use add_menu_page() instead. in example.com/htdocs/www/wp-includes/functions.php on line 3662
]]>Notice: add_object_page is deprecated since version 4.5! Use add_menu_page() instead.
It’s happening on our plugin test platform that runs the latest WordPress Betas, so it’s not an issue for production, but you should still look into this.
https://www.ads-software.com/plugins/contact-form-7/
]]>i want to make Settings/store/import page only available in the admin for custom role user created with ‘capsman’ plugin with assigned Capabilities( per screenshot):
https://wasabi.co/dump/user_caps.png (not sure if thats good),
so the client can upload .csv file on their own.
How can i add custom menu exmp: ‘Shop Product imports’ which links directly to Settings>store>imports page.
The problem is that my form posts to options.php, (following book advice). Should the form post elsewhere?
Is it possible to save options to a custom database table using dbDelta instead of to the wp-options table. I am currently using the register_setting() add_settings_section() add_settings_field() formula.
What is your take on this? How would you grab _POST[] and save to database table?
]]>