Make WordPress Core


Ignore:
Timestamp:
07/17/2018 04:07:45 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Privacy: Enable pagination screen options for privacy requests list tables.

Props birgire, pbiron.
Merges [43486] to the 4.9 branch.
Fixes #44025.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/includes/user.php

    r43485 r43487  
    965965}
    966966
     967/**
     968 * Add options for the privacy requests screens.
     969 *
     970 * @since 4.9.8
     971 * @access private
     972 */
     973function _wp_privacy_requests_screen_options() {
     974    $args = array(
     975        'option'  => str_replace( 'tools_page_', '', get_current_screen()->id ) . '_requests_per_page',
     976    );
     977    add_screen_option( 'per_page', $args );
     978}
     979
    967980// TODO: move the following classes in new files.
    968981if ( ! class_exists( 'WP_List_Table' ) ) {
     
    11821195
    11831196        $this->items    = array();
    1184         $posts_per_page = 20;
     1197        $posts_per_page = $this->get_items_per_page( $this->request_type . '_requests_per_page' );
    11851198        $args           = array(
    11861199            'post_type'      => $this->post_type,
Note: See TracChangeset for help on using the changeset viewer.