WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #47690, comment 1


Ignore:
Timestamp:
07/28/2019 10:17:29 AM (2 years ago)
Author:
donmhico
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #47690, comment 1

    v1 v2  
    1515is unique for the `add_submenu_page()` then I suppose there's no harm using `remove_all_actions( $hookname )`. If it's not then we do need to somehow hold the `$function` passed on `add_submenu_page()` and use `remove_action( $hookname, $function )` instead.
    1616
    17 It is important to remove the action because the submenu will be accessible using the direct link with the function callback as the output.
     17It is important to remove the action because the submenu page will be accessible using the direct link with the function callback as the output even if the revised `remove_submenu_page()` is called.
    1818
    1919Another thing is, I changed the variable names passed on `remove_submenu_page()` from `$menu_slug` and `$submenu_slug` to `$parent_slug` and `$menu_slug` to make it consistent with the variable names used on `add_submenu_page()`.