Make WordPress Core


Ignore:
Timestamp:
11/16/2014 07:32:00 PM (10 years ago)
Author:
johnbillion
Message:

Add a filter to the displayed title of the default page template.

Fixes #27178
Props johnstonphilip

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/meta-boxes.php

    r29454 r30360  
    745745<p><strong><?php _e('Template') ?></strong></p>
    746746<label class="screen-reader-text" for="page_template"><?php _e('Page Template') ?></label><select name="page_template" id="page_template">
    747 <option value='default'><?php _e('Default Template'); ?></option>
     747<?php
     748/**
     749* Filter the title of the default page template displayed in the dropdown.
     750*
     751* @since 4.1.0
     752*
     753* @param string $label   The display value for the default page template title.
     754* @param string $context Where the option label is displayed. Possible values include 'meta-box' and 'quick-edit'.
     755*/
     756$default_title = apply_filters( 'default_page_template_title',  __( 'Default Template' ), 'meta-box' );
     757?>
     758<option value="default"><?php echo esc_html( $default_title ); ?></option>
    748759<?php page_template_dropdown($template); ?>
    749760</select>
Note: See TracChangeset for help on using the changeset viewer.