diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 13c0c9b8da..355426d6d4 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -793,7 +793,7 @@ function _wp_personal_data_handle_actions() { add_settings_error( 'username_or_email_to_export', 'username_or_email_to_export', - __( 'Unable to add export request. A valid email address or username must be supplied.' ), + __( 'Unable to add this request. A valid email address or username must be supplied.' ), 'error' ); } else { @@ -980,7 +980,7 @@ abstract class WP_Privacy_Requests_Table extends WP_List_Table { /** * Action name for the requests this table will work with. Classes * which inherit from WP_Privacy_Requests_Table should define this. - * e.g. 'user_export_request' + * e.g. 'export_personal_data' * * @since 5.0.0 * @@ -988,6 +988,15 @@ abstract class WP_Privacy_Requests_Table extends WP_List_Table { */ protected $request_type = 'INVALID'; + /** + * Post type to be used. + * + * @since 5.0.0 + * + * @var string $post_type The post type. + */ + protected $post_type = 'INVALID'; + /** * Get columns to show in the list table. * @@ -1041,7 +1050,7 @@ abstract class WP_Privacy_Requests_Table extends WP_List_Table { $statuses = _wp_privacy_statuses(); $views = array(); $admin_url = admin_url( 'tools.php?page=' . $this->request_type ); - $counts = wp_count_posts( $this->request_type ); + $counts = wp_count_posts( $this->post_type ); $current_link_attributes = empty( $current_status ) ? ' class="current" aria-current="page"' : ''; $views['all'] = '" . esc_html__( 'All' ) . ' (' . absint( array_sum( (array) $counts ) ) . ')'; @@ -1136,7 +1145,7 @@ abstract class WP_Privacy_Requests_Table extends WP_List_Table { $this->items = array(); $posts_per_page = 20; $args = array( - 'post_type' => $this->request_type, + 'post_type' => $this->post_type, 'posts_per_page' => $posts_per_page, 'offset' => isset( $_REQUEST['paged'] ) ? max( 0, absint( $_REQUEST['paged'] ) - 1 ) * $posts_per_page: 0, 'post_status' => 'any', @@ -1323,15 +1332,22 @@ abstract class WP_Privacy_Requests_Table extends WP_List_Table { */ class WP_Privacy_Data_Export_Requests_Table extends WP_Privacy_Requests_Table { /** - * Action name for the requests this table will work with. Classes - * which inherit from WP_Privacy_Requests_Table should define this. - * e.g. 'user_export_request' + * Action name for the requests this table will work with. * * @since 5.0.0 * * @var string $request_type Name of action. */ - protected $request_type = 'user_export_request'; + protected $request_type = 'export_personal_data'; + + /** + * Post type for the requests. + * + * @since 5.0.0 + * + * @var string $post_type The post type. + */ + protected $post_type = 'user_export_request'; /** * Actions column. @@ -1386,15 +1402,22 @@ class WP_Privacy_Data_Export_Requests_Table extends WP_Privacy_Requests_Table { */ class WP_Privacy_Data_Removal_Requests_Table extends WP_Privacy_Requests_Table { /** - * Action name for the requests this table will work with. Classes - * which inherit from WP_Privacy_Requests_Table should define this. - * e.g. 'user_remove_request' + * Action name for the requests this table will work with. * * @since 5.0.0 * * @var string $request_type Name of action. */ - protected $request_type = 'user_remove_request'; + protected $request_type = 'remove_personal_data'; + + /** + * Post type for the requests. + * + * @since 5.0.0 + * + * @var string $post_type The post type. + */ + protected $post_type = 'user_remove_request'; /** * Actions column. diff --git a/wp-includes/version.php b/wp-includes/version.php index 0174704beb..4ae60eb974 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42976'; +$wp_version = '5.0-alpha-42977'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.