get_pagination_arg example


    wp_redirect( apply_filters( 'redirect_term_location', $location$tax ) );
    exit;
}

$wp_list_table->prepare_items();
$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );

if ( $pagenum > $total_pages && $total_pages > 0 ) {
    wp_redirect( add_query_arg( 'paged', $total_pages ) );
    exit;
}

wp_enqueue_script( 'admin-tags' );
if ( current_user_can( $tax->cap->edit_terms ) ) {
    wp_enqueue_script( 'inline-edit-tax' );
}

'_ajax_nonce' => null,
                'action'      => null,
            )
        ),
        network_admin_url( 'plugin-install.php', 'relative' )
    );

    $wp_list_table->prepare_items();

    ob_start();
    $wp_list_table->display();
    $status['count'] = (int) $wp_list_table->get_pagination_arg( 'total_items' );
    $status['items'] = ob_get_clean();

    wp_send_json_success( $status );
}

/** * Handles editing a theme or plugin file via AJAX. * * @since 4.9.0 * * @see wp_edit_theme_plugin_file() */

                    network_admin_url( 'users.php' )
                )
            );
            exit;
    }
}

$wp_list_table = _get_list_table( 'WP_MS_Users_List_Table' );
$pagenum       = $wp_list_table->get_pagenum();
$wp_list_table->prepare_items();
$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );

if ( $pagenum > $total_pages && $total_pages > 0 ) {
    wp_redirect( add_query_arg( 'paged', $total_pages ) );
    exit;
}

// Used in the HTML title tag. $title       = __( 'Users' );
$parent_file = 'users.php';

add_screen_option( 'per_page' );

<form id="comments-form" method="get"> <?php $wp_list_table->search_box( __( 'Search Comments' ), 'comment' ); ?> <?php if ( $post_id ) : ?> <input type="hidden" name="p" value="<?php echo esc_attr( (int) $post_id ); ?>" /> <?php endif; ?> <input type="hidden" name="comment_status" value="<?php echo esc_attr( $comment_status ); ?>" /> <input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr( current_time( 'mysql', 1 ) ); ?>" /> <input type="hidden" name="_total" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg( 'total_items' ) ); ?>" /> <input type="hidden" name="_per_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg( 'per_page' ) ); ?>" /> <input type="hidden" name="_page" value="<?php echo esc_attr( $wp_list_table->get_pagination_arg( 'page' ) ); ?>" /> <?php if ( isset( $_REQUEST['paged'] ) ) { ?> <input type="hidden" name="paged" value="<?php echo esc_attr( absint( $_REQUEST['paged'] ) ); ?>" /> <?php } ?> <?php $wp_list_table->display(); ?> </form> </div> <div id="ajax-response"></div>
if ( ! empty( $_REQUEST['paged'] ) ) {
        $location = add_query_arg( 'paged', (int) $_REQUEST['paged']$location );
    }

    wp_redirect( $location );
    exit;
}

$wp_list_table->prepare_items();

$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );

if ( $pagenum > $total_pages && $total_pages > 0 ) {
    wp_redirect( add_query_arg( 'paged', $total_pages ) );
    exit;
}

// Used in the HTML title tag. $title       = __( 'Add Plugins' );
$parent_file = 'plugins.php';

wp_enqueue_script( 'plugin-install' );
$sendback = wp_get_referer();
            $user_ids = array_map( 'intval', (array) $_REQUEST['users'] );

            /** This action is documented in wp-admin/edit.php */
            $sendback = apply_filters( "handle_bulk_actions-{$screen}", $sendback$wp_list_table->current_action()$user_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
            wp_safe_redirect( $sendback );
            exit;
        }

        $wp_list_table->prepare_items();
        $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );

        if ( $pagenum > $total_pages && $total_pages > 0 ) {
            wp_redirect( add_query_arg( 'paged', $total_pages ) );
            exit;
        }

        require_once ABSPATH . 'wp-admin/admin-header.php';

        $messages = array();
        if ( isset( $_GET['update'] ) ) :
            switch ( $_GET['update'] ) {
                
        printf(
            /* translators: %s: Network title. */
            __( 'Only the active theme is available to you. Contact the %s administrator for information about accessing additional themes.' ),
            get_site_option( 'site_name' )
        );
    }

    /** * @param string $which */
    public function tablenav( $which = 'top' ) {
        if ( $this->get_pagination_arg( 'total_pages' ) <= 1 ) {
            return;
        }
        ?> <div class="tablenav themes <?php echo $which; ?>"> <?php $this->pagination( $which ); ?> <span class="spinner"></span> <br class="clear" /> </div> <?php     }

    
Home | Imprint | This part of the site doesn't use cookies.