Make WordPress Core

Ticket #44845: 44845.diff

File 44845.diff, 3.4 KB (added by birgire, 6 years ago)
  • src/wp-admin/includes/list-table.php

    diff --git src/wp-admin/includes/list-table.php src/wp-admin/includes/list-table.php
    index 168aebb..eb7a249 100644
     
    2222function _get_list_table( $class, $args = array() ) {
    2323        $core_classes = array(
    2424                //Site Admin
    25                 'WP_Posts_List_Table'          => 'posts',
    26                 'WP_Media_List_Table'          => 'media',
    27                 'WP_Terms_List_Table'          => 'terms',
    28                 'WP_Users_List_Table'          => 'users',
    29                 'WP_Comments_List_Table'       => 'comments',
    30                 'WP_Post_Comments_List_Table'  => array( 'comments', 'post-comments' ),
    31                 'WP_Links_List_Table'          => 'links',
    32                 'WP_Plugin_Install_List_Table' => 'plugin-install',
    33                 'WP_Themes_List_Table'         => 'themes',
    34                 'WP_Theme_Install_List_Table'  => array( 'themes', 'theme-install' ),
    35                 'WP_Plugins_List_Table'        => 'plugins',
     25                'WP_Posts_List_Table'                    => 'posts',
     26                'WP_Media_List_Table'                    => 'media',
     27                'WP_Terms_List_Table'                    => 'terms',
     28                'WP_Users_List_Table'                    => 'users',
     29                'WP_Comments_List_Table'                 => 'comments',
     30                'WP_Post_Comments_List_Table'            => array( 'comments', 'post-comments' ),
     31                'WP_Links_List_Table'                    => 'links',
     32                'WP_Plugin_Install_List_Table'           => 'plugin-install',
     33                'WP_Themes_List_Table'                   => 'themes',
     34                'WP_Theme_Install_List_Table'            => array( 'themes', 'theme-install' ),
     35                'WP_Plugins_List_Table'                  => 'plugins',
     36                'WP_Privacy_Data_Export_Requests_Table'  => 'export_personal_data',
     37                'WP_Privacy_Data_Removal_Requests_Table' => 'remove_personal_data',
    3638                // Network Admin
    37                 'WP_MS_Sites_List_Table'       => 'ms-sites',
    38                 'WP_MS_Users_List_Table'       => 'ms-users',
    39                 'WP_MS_Themes_List_Table'      => 'ms-themes',
     39                'WP_MS_Sites_List_Table'                 => 'ms-sites',
     40                'WP_MS_Users_List_Table'                 => 'ms-users',
     41                'WP_MS_Themes_List_Table'                => 'ms-themes',
    4042        );
    4143
    4244        if ( isset( $core_classes[ $class ] ) ) {
  • src/wp-admin/includes/user.php

    diff --git src/wp-admin/includes/user.php src/wp-admin/includes/user.php
    index 4634c8e..aff5b1e 100644
    function _wp_personal_data_export_page() { 
    805805        // "Borrow" xfn.js for now so we don't have to create new files.
    806806        wp_enqueue_script( 'xfn' );
    807807
    808         $requests_table = new WP_Privacy_Data_Export_Requests_Table(
    809                 array(
    810                         'plural'   => 'privacy_requests',
    811                         'singular' => 'privacy_request',
    812                 )
     808        $args = array(
     809                'plural'   => 'privacy_requests',
     810                'singular' => 'privacy_request',
    813811        );
     812        $requests_table = _get_list_table( 'WP_Privacy_Data_Export_Requests_Table', $args );
     813       
    814814        $requests_table->process_bulk_action();
    815815        $requests_table->prepare_items();
    816816        ?>
    function _wp_personal_data_removal_page() { 
    878878        // "Borrow" xfn.js for now so we don't have to create new files.
    879879        wp_enqueue_script( 'xfn' );
    880880
    881         $requests_table = new WP_Privacy_Data_Removal_Requests_Table(
    882                 array(
    883                         'plural'   => 'privacy_requests',
    884                         'singular' => 'privacy_request',
    885                 )
     881        $args = array(
     882                'plural'   => 'privacy_requests',
     883                'singular' => 'privacy_request',
    886884        );
     885        $requests_table = _get_list_table( 'WP_Privacy_Data_Removal_Requests_Table', $args );
    887886
    888887        $requests_table->process_bulk_action();
    889888        $requests_table->prepare_items();