page_attributes_meta_box_template
Fires immediately after the label inside the 'Template' section of the 'Page Attributes' meta box.
Usage
add_action( 'page_attributes_meta_box_template', 'wp_kama_page_attributes_meta_box_template_action', 10, 2 ); /** * Function for `page_attributes_meta_box_template` action-hook. * * @param string|false $template The template used for the current post. * @param WP_Post $post The current post. * * @return void */ function wp_kama_page_attributes_meta_box_template_action( $template, $post ){ // action... }
- $template(string|false)
- The template used for the current post.
- $post(WP_Post)
- The current post.
Changelog
Since 4.4.0 | Introduced. |
Where the hook is called
page_attributes_meta_box_template
wp-admin/includes/meta-boxes.php 1049
do_action( 'page_attributes_meta_box_template', $template, $post );