Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: {$page_hook}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
244            * 3. The plugin basename minus the file extension.
245            *
246            * Together, the three parts form the `$page_hook`. Citing the example above,
247            * the hook name used would be 'settings_page_pluginbasename'.
248            *
249            * @see get_plugin_page_hook()
250            *
251            * @since 1.5.0
252            */
253           do_action( $page_hook );
254      } else {
255           if ( validate_file( $plugin_page ) ) {
256                wp_die( __( 'Invalid plugin page.' ) );
257           }
258
259           if ( ! ( file_exists( WP_PLUGIN_DIR . "/$plugin_page" ) && is_file( WP_PLUGIN_DIR . "/$plugin_page" ) ) && ! ( file_exists( WPMU_PLUGIN_DIR . "/$plugin_page" ) && is_file( WPMU_PLUGIN_DIR . "/$plugin_page" ) ) ) {
260                wp_die( sprintf( __( 'Cannot load %s.' ), htmlentities( $plugin_page ) ) );
261           }
262