WordPress Hooks Explorer

Listing all hooks extracted WordPress Core


Details about default_page_template_title

Back to home

Files

Filename Hook Type Line Number PHP Doc
wp-admin/edit-form-blocks.php apply_filters 140 /**
* @global string $post_type
* @global WP_Post_Type $post_type_object
* @global WP_Post $post Global post object.
* @global string $title
* @global array $wp_meta_boxes
*/
global $post_type, $post_type_object, $post, $title, $wp_meta_boxes;

$block_editor_context = new WP_Block_Editor_Context( array( 'post' => $post ) );

// Flag that we're loading the block editor.
$current_screen = get_current_screen();
$current_screen->is_block_editor( true );

// Default to is-fullscreen-mode to avoid jumps in the UI.
add_filter(
'admin_body_class',
static function( $classes ) {
return "$classes is-fullscreen-mode";
}
);

/*
* Emoji replacement is disabled for now, until it plays nicely with React.
*/
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );

/*
* Block editor implements its own Options menu for toggling Document Panels.
*/
add_filter( 'screen_options_show_screen', '__return_false' );

wp_enqueue_script( 'heartbeat' );
wp_enqueue_script( 'wp-edit-post' );

$rest_path = rest_get_route_for_post( $post );

// Preload common data.
$preload_paths = array(
'/wp/v2/types?context=view',
'/wp/v2/taxonomies?context=view',
add_query_arg(
array(
'context' => 'edit',
'per_page' => -1,
),
rest_get_route_for_post_type_items( 'wp_block' )
),
add_query_arg( 'context', 'edit', $rest_path ),
sprintf( '/wp/v2/types/%s?context=edit', $post_type ),
'/wp/v2/users/me',
array( rest_get_route_for_post_type_items( 'attachment' ), 'OPTIONS' ),
array( rest_get_route_for_post_type_items( 'page' ), 'OPTIONS' ),
array( rest_get_route_for_post_type_items( 'wp_block' ), 'OPTIONS' ),
array( rest_get_route_for_post_type_items( 'wp_template' ), 'OPTIONS' ),
sprintf( '%s/autosaves?context=edit', $rest_path ),
'/wp/v2/settings',
array( '/wp/v2/settings', 'OPTIONS' ),
);

block_editor_rest_api_preload( $preload_paths, $block_editor_context );

wp_add_inline_script(
'wp-blocks',
sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( get_block_categories( $post ) ) ),
'after'
);

/*
* Assign initial edits, if applicable. These are not initially assigned to the persisted post,
* but should be included in its save payload.
*/
$initial_edits = array();
$is_new_post = false;
if ( 'auto-draft' === $post->post_status ) {
$is_new_post = true;
// Override "(Auto Draft)" new post default title with empty string, or filtered value.
if ( post_type_supports( $post->post_type, 'title' ) ) {
$initial_edits['title'] = $post->post_title;
}

if ( post_type_supports( $post->post_type, 'editor' ) ) {
$initial_edits['content'] = $post->post_content;
}

if ( post_type_supports( $post->post_type, 'excerpt' ) ) {
$initial_edits['excerpt'] = $post->post_excerpt;
}
}

// Preload server-registered block schemas.
wp_add_inline_script(
'wp-blocks',
'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');'
);

// Get admin url for handling meta boxes.
$meta_box_url = admin_url( 'post.php' );
$meta_box_url = add_query_arg(
array(
'post' => $post->ID,
'action' => 'edit',
'meta-box-loader' => true,
'meta-box-loader-nonce' => wp_create_nonce( 'meta-box-loader' ),
),
$meta_box_url
);
wp_add_inline_script(
'wp-editor',
sprintf( 'var _wpMetaBoxUrl = %s;', wp_json_encode( $meta_box_url ) ),
'before'
);

/*
* 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.
*/
wp-admin/includes/meta-boxes.php apply_filters 1004 /**
* 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'.
*/
wp-admin/includes/class-wp-posts-list-table.php apply_filters 1836 /**
* Filters the arguments used to generate the Quick Edit page-parent drop-down.
*
* @since 2.7.0
* @since 5.6.0 The `$bulk` parameter was added.
*
* @see wp_dropdown_pages()
*
* @param array $dropdown_args An array of arguments passed to wp_dropdown_pages().
* @param bool $bulk A flag to denote if it's a bulk action.
*/

Hook Parameters

Parameter Type Name Description
string $label The display value for the default page template title.
string $context Where the option label is displayed. Possible values