diff -r 34716fd837a4 -r be944660c56a wp/wp-admin/options-privacy.php --- a/wp/wp-admin/options-privacy.php Tue Dec 15 15:52:01 2020 +0100 +++ b/wp/wp-admin/options-privacy.php Wed Sep 21 18:19:35 2022 +0200 @@ -10,9 +10,23 @@ require_once __DIR__ . '/admin.php'; if ( ! current_user_can( 'manage_privacy_options' ) ) { - wp_die( __( 'Sorry, you are not allowed to manage privacy on this site.' ) ); + wp_die( __( 'Sorry, you are not allowed to manage privacy options on this site.' ) ); +} + +if ( isset( $_GET['tab'] ) && 'policyguide' === $_GET['tab'] ) { + require_once dirname( __FILE__ ) . '/privacy-policy-guide.php'; + return; } +add_filter( + 'admin_body_class', + function( $body_class ) { + $body_class .= ' privacy-settings '; + + return $body_class; + } +); + $action = isset( $_POST['action'] ) ? $_POST['action'] : ''; if ( ! empty( $action ) ) { @@ -112,15 +126,45 @@ } } -$title = __( 'Privacy Settings' ); $parent_file = 'options-general.php'; +wp_enqueue_script( 'privacy-tools' ); + require_once ABSPATH . 'wp-admin/admin-header.php'; ?> -
-

-

+
+
+

+ +

+
+ + +
+ +
+ +
+

+
+ +
+

@@ -133,57 +177,87 @@

- $privacy_policy_page_id, - 'action' => 'edit', - ), - admin_url( 'post.php' ) - ); - - $view_href = get_permalink( $privacy_policy_page_id ); - ?> -

- Edit or view your Privacy Policy page content.' ), - esc_url( $edit_href ), - esc_url( $view_href ) - ); - } else { - printf( - /* translators: 1: URL to edit Privacy Policy page, 2: URL to preview Privacy Policy page. */ - __( 'Edit or preview your Privacy Policy page content.' ), - esc_url( $edit_href ), - esc_url( $view_href ) - ); - } - ?> -

-

$privacy_policy_page_id, + 'action' => 'edit', + ), + admin_url( 'post.php' ) + ); + $view_href = get_permalink( $privacy_policy_page_id ); + ?> + + Edit or view your Privacy Policy page content.' ), + esc_url( $edit_href ), + esc_url( $view_href ) + ); + } else { + printf( + /* translators: 1: URL to edit Privacy Policy page, 2: URL to preview Privacy Policy page. */ + __( 'Edit or preview your Privacy Policy page content.' ), + esc_url( $edit_href ), + esc_url( $view_href ) + ); + } + ?> + + Check out our guide%3$s for recommendations on what content to include, along with policies suggested by your plugins and theme.' ), - esc_url( admin_url( 'privacy-policy-guide.php' ) ), + __( 'Need help putting together your new Privacy Policy page? Check out our Privacy Policy guide%3$s for recommendations on what content to include, along with policies suggested by your plugins and theme.' ), + esc_url( admin_url( 'options-privacy.php?tab=policyguide' ) ), '', '' ); ?>

-
+ 'page', + 'posts_per_page' => 1, + 'post_status' => array( + 'publish', + 'draft', + ), + ) + ); + ?> + + + + + +