Uses
| Uses | Description |
|---|---|
| wp-admin/includes/plugin.php: get_plugin_page_hookname() | Gets the hook name for the administrative page of a plugin. |
| wp-includes/plugin.php: has_action() | Check if any action has been registered for a hook. |
Gets the hook attached to the administrative page of a plugin.
(string) (Required) The slug name of the plugin page.
(string) (Required) The slug name for the parent menu (or the file name of a standard WordPress admin page).
(string|null) Hook attached to the plugin page, null otherwise.
File: wp-admin/includes/plugin.php
function get_plugin_page_hook( $plugin_page, $parent_page ) {
$hook = get_plugin_page_hookname( $plugin_page, $parent_page );
if ( has_action( $hook ) ) {
return $hook;
} else {
return null;
}
} | Version | Description |
|---|---|
| 1.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_plugin_page_hook