wppaste
WordPress

do_action( "{$page_hook}" )

Since
1.5.0
Used to call the registered callback for a plugin screen.

Description

This hook uses a dynamic hook name, $page_hook, which refers to a mixture of plugin page information including:

  1. The page type. If the plugin page is registered as a submenu page, such as for Settings, the page type would be 'settings'. Otherwise the type is 'toplevel'.
  2. A separator of 'page'.
  3. The plugin basename minus the file extension.

Together, the three parts form the $page_hook. Citing the example above, the hook name used would be 'settings_page_pluginbasename'.

Compatibility

WordPress
since 1.5.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Where this hook fires · 1

  • wp-admin/admin.php:260file scope

Source code

		 * the hook name used would be 'settings_page_pluginbasename'.		 *		 * @see get_plugin_page_hook()		 *		 * @since 1.5.0		 */		do_action( $page_hook );	} else {		if ( validate_file( $plugin_page ) ) {			wp_die( __( 'Invalid plugin page.' ) );		} 		if ( ! ( file_exists( WP_PLUGIN_DIR . "/$plugin_page" ) && is_file( WP_PLUGIN_DIR . "/$plugin_page" ) )

Changelog

Introduced in 1.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.