default_page_template_title
Filter HookDescription
Filters the arguments used to generate the Quick Edit page-parent drop-down.Hook Information
File Location |
wp-admin/includes/class-wp-posts-list-table.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1895 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$dropdown_args
|
An array of arguments passed to wp_dropdown_pages(). |
bool
|
$bulk
|
A flag to denote if it's a bulk action. |
Usage Examples
Basic Usage
<?php
// Hook into default_page_template_title
add_filter('default_page_template_title', 'my_custom_filter', 10, 2);
function my_custom_filter($dropdown_args, $bulk) {
// Your custom filtering logic here
return $dropdown_args;
}
Source Code Context
wp-admin/includes/class-wp-posts-list-table.php:1895
- How this hook is used in WordPress core
<?php
1890 <?php if ( $bulk ) : ?>
1891 <option value="-1"><?php _e( '— No Change —' ); ?></option>
1892 <?php endif; // $bulk ?>
1893 <?php
1894 /** This filter is documented in wp-admin/includes/meta-boxes.php */
1895 $default_title = apply_filters( 'default_page_template_title', __( 'Default template' ), 'quick-edit' );
1896 ?>
1897 <option value="default"><?php echo esc_html( $default_title ); ?></option>
1898 <?php page_template_dropdown( '', $screen->post_type ); ?>
1899 </select>
1900 </label>
PHP Documentation
<?php
/**
* 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.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-admin/includes/class-wp-posts-list-table.php
Related Hooks
Related hooks will be displayed here in future updates.