On this page
WP_Media_List_Table::extra_tablenav( string $which )
Parameters
$whichstring Required
Source
File: wp-admin/includes/class-wp-media-list-table.php. View all references
protected function extra_tablenav( $which ) {
if ( 'bar' !== $which ) {
return;
}
?>
<div class="actions">
<?php
if ( ! $this->is_trash ) {
$this->months_dropdown( 'attachment' );
}
/** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */
do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
if ( $this->is_trash && $this->has_items()
&& current_user_can( 'edit_others_posts' )
) {
submit_button( __( 'Empty Trash' ), 'apply', 'delete_all', false );
}
?>
</div>
<?php
}
Hooks
- do_action( 'restrict_manage_posts',
string $post_type ,string $which ) -
Fires before the Filter button on the Posts and Pages list tables.
Related
Uses
| Uses | Description |
|---|---|
| submit_button() wp-admin/includes/template.php | Echoes a submit button, with provided text and appropriate class(es). |
| WP_Media_List_Table::has_items() wp-admin/includes/class-wp-media-list-table.php | |
| current_user_can() wp-includes/capabilities.php | Returns whether the current user has the specified capability. |
| __() wp-includes/l10n.php | Retrieves the translation of $text. |
| do_action() wp-includes/plugin.php | Calls the callback functions that have been added to an action hook. |
Used By
| Used By | Description |
|---|---|
| WP_Media_List_Table::views() wp-admin/includes/class-wp-media-list-table.php | Override parent views so we can use the filter bar display. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_media_list_table/extra_tablenav