WordPress.org

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Plugin API/Filter Reference/default page template title

Description

The "default_page_template_title" filter can be used to change the title of the default page template in WordPress. It was introduced in version 4.1.

Usage

When the 'default_page_template_title' filter is called, it is passed two parameters: the label which is the display value for the default page template title, and the context where the option label is displayed.

function filter_function_name( $label, $context ) {
  return __( 'Custom Page Template Title', 'textdomain' );
}
add_filter( 'default_page_template_title', 'filter_function_name', 10, 2 );

Where 'filter_function_name' is the function WordPress should call when filter is run.

filter_function_name should be unique function name. It cannot match any other function name already declared.

Parameters

$label
(string) (required) The display value for the default page template title.
Default: None
$context
(string) (optional) Where the option label is displayed. Possible values include 'meta-box' or 'quick-edit'.
Default: None


This page is marked as incomplete. You can help Codex by expanding it.