Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Alter a wordpress plugin funciton via functions.php??

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #28860
    bmsorg
    Member

    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

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.