mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 09:34:41 +00:00
Privacy: add new wp-admin screens for exporting and removing of personal data.
Props @melchoyce, @mikejolley, @allendav, @xkon. See #43481. git-svn-id: https://develop.svn.wordpress.org/trunk@42967 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -226,6 +226,38 @@ function create_initial_post_types() {
|
||||
)
|
||||
);
|
||||
|
||||
register_post_type(
|
||||
'user_export_request', array(
|
||||
'labels' => array(
|
||||
'name' => __( 'Export Personal Data Requests' ),
|
||||
'singular_name' => __( 'Export Personal Data Request' ),
|
||||
),
|
||||
'public' => false,
|
||||
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
|
||||
'hierarchical' => false,
|
||||
'rewrite' => false,
|
||||
'query_var' => false,
|
||||
'can_export' => false,
|
||||
'delete_with_user' => false,
|
||||
)
|
||||
);
|
||||
|
||||
register_post_type(
|
||||
'user_remove_request', array(
|
||||
'labels' => array(
|
||||
'name' => __( 'Remove Personal Data Requests' ),
|
||||
'singular_name' => __( 'Remove Personal Data Request' ),
|
||||
),
|
||||
'public' => false,
|
||||
'_builtin' => true, /* internal use only. don't use this when registering your own post type. */
|
||||
'hierarchical' => false,
|
||||
'rewrite' => false,
|
||||
'query_var' => false,
|
||||
'can_export' => false,
|
||||
'delete_with_user' => false,
|
||||
)
|
||||
);
|
||||
|
||||
register_post_status(
|
||||
'publish', array(
|
||||
'label' => _x( 'Published', 'post status' ),
|
||||
@@ -297,6 +329,42 @@ function create_initial_post_types() {
|
||||
'exclude_from_search' => false,
|
||||
)
|
||||
);
|
||||
|
||||
register_post_status(
|
||||
'request-pending', array(
|
||||
'label' => _x( 'Pending', 'request status' ),
|
||||
'internal' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
'exclude_from_search' => false,
|
||||
)
|
||||
);
|
||||
|
||||
register_post_status(
|
||||
'request-confirmed', array(
|
||||
'label' => _x( 'Confirmed', 'request status' ),
|
||||
'internal' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
'exclude_from_search' => false,
|
||||
)
|
||||
);
|
||||
|
||||
register_post_status(
|
||||
'request-failed', array(
|
||||
'label' => _x( 'Failed', 'request status' ),
|
||||
'internal' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
'exclude_from_search' => false,
|
||||
)
|
||||
);
|
||||
|
||||
register_post_status(
|
||||
'request-completed', array(
|
||||
'label' => _x( 'Completed', 'request status' ),
|
||||
'internal' => true,
|
||||
'_builtin' => true, /* internal use only. */
|
||||
'exclude_from_search' => false,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -782,6 +850,22 @@ function get_page_statuses() {
|
||||
return $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return statuses for privacy requests.
|
||||
*
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function _wp_privacy_statuses() {
|
||||
return array(
|
||||
'request-pending' => __( 'Pending' ), // Pending confirmation from user.
|
||||
'request-confirmed' => __( 'Confirmed' ), // User has confirmed the action.
|
||||
'request-failed' => __( 'Failed' ), // User failed to confirm the action.
|
||||
'request-completed' => __( 'Completed' ), // Admin has handled the request.
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a post status. Do not use before init.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user