page_attributes_meta_box_template
Action HookDescription
Fires immediately after the label inside the 'Template' section of the 'Page Attributes' meta box.Hook Information
File Location |
wp-admin/includes/meta-boxes.php
View on GitHub
|
Hook Type | Action |
Line Number | 1049 |
Hook Parameters
Type | Name | Description |
---|---|---|
string|false
|
$template
|
The template used for the current post. |
WP_Post
|
$post
|
The current post. |
Usage Examples
Basic Usage
<?php
// Hook into page_attributes_meta_box_template
add_action('page_attributes_meta_box_template', 'my_custom_function', 10, 2);
function my_custom_function($template, $post) {
// Your custom code here
}
Source Code Context
wp-admin/includes/meta-boxes.php:1049
- How this hook is used in WordPress core
<?php
1044 * @since 4.4.0
1045 *
1046 * @param string|false $template The template used for the current post.
1047 * @param WP_Post $post The current post.
1048 */
1049 do_action( 'page_attributes_meta_box_template', $template, $post );
1050 ?>
1051 </p>
1052 <select name="page_template" id="page_template">
1053 <?php
1054 /**
PHP Documentation
<?php
/**
* Fires immediately after the label inside the 'Template' section
* of the 'Page Attributes' meta box.
*
* @since 4.4.0
*
* @param string|false $template The template used for the current post.
* @param WP_Post $post The current post.
*/
Quick Info
- Hook Type: Action
- Parameters: 2
- File: wp-admin/includes/meta-boxes.php
Related Hooks
Related hooks will be displayed here in future updates.