Add a filter to the displayed title of the default page template.
Fixes #27178 Props johnstonphilip git-svn-id: https://develop.svn.wordpress.org/trunk@30360 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6efcf3e759
commit
c33b85fd39
@ -1104,7 +1104,11 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
<?php if ( $bulk ) : ?>
|
||||
<option value="-1"><?php _e( '— No Change —' ); ?></option>
|
||||
<?php endif; // $bulk ?>
|
||||
<option value="default"><?php _e( 'Default Template' ); ?></option>
|
||||
<?php
|
||||
/** This filter is documented in wp-admin/includes/meta-boxes.php */
|
||||
$default_title = apply_filters( 'default_page_template_title', __( 'Default Template' ), 'quick-edit' );
|
||||
?>
|
||||
<option value="default"><?php echo esc_html( $default_title ); ?></option>
|
||||
<?php page_template_dropdown() ?>
|
||||
</select>
|
||||
</label>
|
||||
|
@ -744,7 +744,18 @@ function page_attributes_meta_box($post) {
|
||||
?>
|
||||
<p><strong><?php _e('Template') ?></strong></p>
|
||||
<label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
|
||||
<option value='default'><?php _e('Default Template'); ?></option>
|
||||
<?php
|
||||
/**
|
||||
* Filter the title of the default page template displayed in the dropdown.
|
||||
*
|
||||
* @since 4.1.0
|
||||
*
|
||||
* @param string $label The display value for the default page template title.
|
||||
* @param string $context Where the option label is displayed. Possible values include 'meta-box' and 'quick-edit'.
|
||||
*/
|
||||
$default_title = apply_filters( 'default_page_template_title', __( 'Default Template' ), 'meta-box' );
|
||||
?>
|
||||
<option value="default"><?php echo esc_html( $default_title ); ?></option>
|
||||
<?php page_template_dropdown($template); ?>
|
||||
</select>
|
||||
<?php
|
||||
|
Loading…
Reference in New Issue
Block a user