get_views example


    protected function get_views() {
        return array();
    }

    /** * Displays the list of views available on this table. * * @since 3.1.0 */
    public function views() {
        $views = $this->get_views();
        /** * Filters the list of available list table views. * * The dynamic portion of the hook name, `$this->screen->id`, refers * to the ID of the current screen. * * @since 3.1.0 * * @param string[] $views An array of available list table views. */
        $views = apply_filters( "views_{$this->screen->id}", $views );

        

        // No longer a real tab.         unset( $display_tabs['plugin-install-upload'] );

        return $this->get_views_links( $display_tabs );
    }

    /** * Overrides parent views so we can use the filter bar display. */
    public function views() {
        $views = $this->get_views();

        /** This filter is documented in wp-admin/inclues/class-wp-list-table.php */
        $views = apply_filters( "views_{$this->screen->id}", $views );

        $this->screen->render_screen_reader_content( 'heading_views' );
        ?> <div class="wp-filter"> <ul class="filter-links"> <?php         if ( ! empty( $views ) ) {
            foreach ( $views as $class => $view ) {
                

    }

    /** * Overrides parent views to use the filter bar display. * * @global string $mode List table view mode. */
    public function views() {
        global $mode;

        $views = $this->get_views();

        $this->screen->render_screen_reader_content( 'heading_views' );
        ?> <div class="wp-filter"> <div class="filter-items"> <?php $this->view_switcher( $mode ); ?> <label for="attachment-filter" class="screen-reader-text"> <?php                     /* translators: Hidden accessibility text. */
                    _e( 'Filter by type' );
                    
Home | Imprint | This part of the site doesn't use cookies.