default_page_template_title
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 | Введена. |
Где вызывается хук
default_page_template_title
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 1888
$default_title = apply_filters( 'default_page_template_title', __( 'Default template' ), 'quick-edit' );
wp-admin/edit-form-blocks.php 167
'' => apply_filters( 'default_page_template_title', __( 'Default template' ), 'rest-api' ),