default_page_template_title хук-фильтрWP 4.1.0

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

Использование

add_filter( 'default_page_template_title', 'wp_kama_default_page_template_title_filter', 10, 2 );

/**
 * Function for `default_page_template_title` filter-hook.
 * 
 * @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'.
 *
 * @return string
 */
function wp_kama_default_page_template_title_filter( $label, $context ){

	// filter...
	return $label;
}
$label(строка)
The display value for the default page template title.
$context(строка)
Where the option label is displayed. Possible values include 'meta-box' or 'quick-edit'.

Список изменений

С версии 4.1.0 Введена.

Где вызывается хук

page_attributes_meta_box()
default_page_template_title
WP_Posts_List_Table::inline_edit()
default_page_template_title
wp-admin/includes/meta-boxes.php 1063
$default_title = apply_filters( 'default_page_template_title', __( 'Default template' ), 'meta-box' );
wp-admin/includes/class-wp-posts-list-table.php 1882
$default_title = apply_filters( 'default_page_template_title', __( 'Default template' ), 'quick-edit' );
wp-admin/edit-form-blocks.php 140
'' => apply_filters( 'default_page_template_title', __( 'Default template' ), 'rest-api' ),

Где используется хук в WordPress

Использование не найдено.