This question goes a little beyond my knowledge of php, but here’s what I’m trying to figure out…
I have a wordpress plugin I’m using, it inserts a link in the admin under "Pages". I’d like to have it not be a subpage of "Pages" but rather a tab of it’s own in the admin. This I can figure out, it’s pretty easy… (original)…
Code:
function wpms_admin_menu() {
if (function_exists(‘add_submenu_page’)) {
$page = add_submenu_page(‘edit-pages.php’, __(‘WordPress Menu Order’, ‘wpms’), __(‘WordPress Menu Order’, ‘wpms’), 5, “wp-menu-order”, ‘wpms_menu_order’);
}
}
But what I’d prefer to altering the function directly in the plugin files, is some way I can do this in my functions.php file, so if the plugin is updated it won’t revert back.
Is there a way in the functions.php to alter the plugins function, basically replacing the function above with?…
Code:
function wpms_admin_menu() {
if (function_exists(‘add_menu_page’)) {
$page = add_menu_page( __(‘WordPress Menu Order’, ‘wpms’), __(‘WordPress Menu Order’, ‘wpms’), 5, “wp-menu-order”, ‘wpms_menu_order’);
}
}
thanks, brandon