wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_plugin_page_hook › WordPress Function

Depuis1.5.0
Dépréciéen/a
get_plugin_page_hook ( $plugin_page, $parent_page )
Paramètres: (2)
  • (string) $plugin_page The slug name of the plugin page.
    Requis: Oui
  • (string) $parent_page The slug name for the parent menu (or the file name of a standard WordPress admin page).
    Requis: Oui
Retourne:
  • (string|null) Hook attached to the plugin page, null otherwise.
Défini(e) dans:
Codex:

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



Source

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;
	}
}