months_dropdown example

/** * @param string $which */
    protected function extra_tablenav( $which ) {
        ?> <div class="alignleft actions"> <?php         if ( 'top' === $which ) {
            ob_start();

            $this->months_dropdown( $this->screen->post_type );
            $this->categories_dropdown( $this->screen->post_type );
            $this->formats_dropdown( $this->screen->post_type );

            /** * Fires before the Filter button on the Posts and Pages list tables. * * The Filter button allows sorting by date and/or category on the * Posts list table, and sorting by date on the Pages list table. * * @since 2.1.0 * @since 4.4.0 The `$post_type` parameter was added. * @since 4.6.0 The `$which` parameter was added. * * @param string $post_type The post type slug. * @param string $which The location of the extra table nav markup: * 'top' or 'bottom' for WP_Posts_List_Table, * 'bar' for WP_Media_List_Table. */
/** * @param string $which */
    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 );
            }
Home | Imprint | This part of the site doesn't use cookies.