page_attributes_meta_box_template

Fires immediately after the label inside the 'Template' section of the 'Page Attributes' meta box.

Description

do_action( 'page_attributes_meta_box_template', (string) $template, (WP_Post) $post ); 

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.
  1. // run the action 
  2. do_action( 'page_attributes_meta_box_template', $template, $post ); 
The following example is for adding a hook callback.
  1. // define the page_attributes_meta_box_template callback 
  2. function action_page_attributes_meta_box_template( $template, $post ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'page_attributes_meta_box_template', 'action_page_attributes_meta_box_template', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. 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  
  1. do_action( 'page_attributes_meta_box_template', $template, $post );