WordPress.org

Make WordPress Core

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


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #47690, comment 1

    initial v1  
    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
     17It is important to remove the action because the submenu will be accessible using the direct link with the function callback as the output.
     18
    1719Another 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()`.
    1820