wphooks.info - default_page_template_title

default_page_template_title

(trunk - 5.1-alpha-44286)

The hook occurs in the following 3 files

wp-admin/edit-form-blocks.php:
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
$allowed_block_types = apply_filters( 'allowed_block_types', true, $post );

// Get all available templates for the post/page attributes meta-box.
// The "Default template" array element should only be added if the array is
// not empty so we do not trigger the template select element without any options
// besides the default value.
$available_templates = wp_get_theme()->get_page_templates( get_post( $post->ID ) );
$available_templates = ! empty( $available_templates ) ? array_merge(
	array(
		/** This filter is documented in wp-admin/includes/meta-boxes.php */
		'' => apply_filters( 'default_page_template_title', __( 'Default template' ), 'rest-api' ),
	),
	$available_templates
) : $available_templates;

// Media settings.
$max_upload_size = wp_max_upload_size();
if ( ! $max_upload_size ) {
	$max_upload_size = 0;
}
wp-admin/includes/meta-boxes.php:
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
		<?php
		/**
		 * Filters the title of the default page template displayed in the drop-down.
		 *
		 * @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' or '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, $post->post_type ); ?>
</select>
<?php endif; ?>
	<?php if ( post_type_supports( $post->post_type, 'page-attributes' ) ) : ?>
<p class="post-attributes-label-wrapper"><label class="post-attributes-label" for="menu_order"><?php _e( 'Order' ); ?></label></p>
<input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo esc_attr( $post->menu_order ); ?>" />
		<?php
wp-admin/includes/class-wp-posts-list-table.php:
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
			<?php if ( 0 < count( get_page_templates( null, $screen->post_type ) ) ) : ?>
		<label>
			<span class="title"><?php _e( 'Template' ); ?></span>
			<select name="page_template">
				<?php	if ( $bulk ) : ?>
				<option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
				<?php	endif; // $bulk ?>
				<?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( '', $screen->post_type ); ?>
			</select>
		</label>
	<?php endif; ?>

			<?php if ( count( $flat_taxonomies ) && ! $bulk ) : ?>