get_plugin_page_hook() –

You appear to be a bot. Output may be restricted

Description

Gets the hook attached to the administrative page of a plugin.

Usage

$string|null = get_plugin_page_hook( $plugin_page, $parent_page );

Parameters

$plugin_page
( string ) required – The slug name of the plugin page.
$parent_page
( string ) required – The slug name for the parent menu (or the file name of a standard WordPress admin page).

Returns

string|null Hook attached to the plugin page, null otherwise.

Source

File name: wordpress/wp-admin/includes/plugin.php
Lines:

1 to 8 of 8
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;
  }
}
 

 View on GitHub View on Trac