wppaste
WordPress

apply_filters( 'default_page_template_title', string $label, string $context )

Since
4.1.0
Filters the title of the default page template displayed in the drop-down.

Compatibility

WordPress
since 4.1.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$labelstring
The display value for the default page template title.
$contextstring
Where the option label is displayed. Possible values include 'meta-box' or 'quick-edit'.

Where this hook fires · 3

  • wp-admin/edit-form-blocks.php:204file scope
  • wp-admin/includes/class-wp-posts-list-table.php:1895WP_Posts_List_Table::inline_edit()
  • wp-admin/includes/meta-boxes.php:1063page_attributes_meta_box()

Source code

		 * @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' ) ) : ?>

Changelog

Introduced in 4.1.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.8.8 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.