page_attributes_meta_box_template
Fires immediately after the label inside the 'Template' section of the 'Page Attributes' meta box.
Description
Parameters (2)
- 0. $template (string)
- The template used for the current post.
- 1. $post (WP_Post)
- The current post.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'page_attributes_meta_box_template', $template, $post );
- The following example is for adding a hook callback.
- // define the page_attributes_meta_box_template callback
- function action_page_attributes_meta_box_template( $template, $post ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'page_attributes_meta_box_template', 'action_page_attributes_meta_box_template', 10, 2 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'page_attributes_meta_box_template', 'action_page_attributes_meta_box_template', 10, 2 );
Defined (1)
The action is defined in the following location(s).
- /wp-admin/includes/meta-boxes.php
- do_action( 'page_attributes_meta_box_template', $template, $post );