In `page_attributes_meta_box()`, add an action, `'page_attributes_meta_box_template'` to allow callbacks to be performed and HTML to be inserted after the title of the Template section.

Props sgrant.	
Fixes #33625.

Built from https://develop.svn.wordpress.org/trunk@34340


git-svn-id: http://core.svn.wordpress.org/trunk@34304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-09-20 02:40:24 +00:00
parent d2578f84d1
commit 89a03563c9
2 changed files with 12 additions and 2 deletions

View File

@ -778,7 +778,17 @@ function page_attributes_meta_box($post) {
if ( 'page' == $post->post_type && 0 != count( get_page_templates( $post ) ) && get_option( 'page_for_posts' ) != $post->ID ) { if ( 'page' == $post->post_type && 0 != count( get_page_templates( $post ) ) && get_option( 'page_for_posts' ) != $post->ID ) {
$template = !empty($post->page_template) ? $post->page_template : false; $template = !empty($post->page_template) ? $post->page_template : false;
?> ?>
<p><strong><?php _e('Template') ?></strong></p> <p><strong><?php _e('Template') ?></strong><?php
/**
* Perform actions immediately after displaying the heading for the Template
* section of the Page Attributes meta box.
*
* @since 4.4.0
*
* @param string $template The template used for the current post.
*/
do_action( 'page_attributes_meta_box_template', $template );
?></p>
<label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template"> <label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
<?php <?php
/** /**

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.4-alpha-34339'; $wp_version = '4.4-alpha-34340';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.