diff --git a/src/wp-admin/css/forms.css b/src/wp-admin/css/forms.css index 97e8180ee0..74fe2f96ee 100644 --- a/src/wp-admin/css/forms.css +++ b/src/wp-admin/css/forms.css @@ -1076,6 +1076,119 @@ table.form-table td .updated p { clear: both; } +/*------------------------------------------------------------------------------ + Privacy Policy settings screen +------------------------------------------------------------------------------*/ +.tools-privacy-policy-page form { + margin-bottom: 1.3em; +} + +.tools-privacy-policy-page input.button, +.tools-privacy-policy-page select { + margin-left: 6px; +} + +.tools-privacy-edit { + margin: 2.3em 0; +} + +.tools-privacy-policy-page span { + line-height: 2em; +} + +.privacy_requests .column-email { + width: 40%; +} + +.privacy_requests .column-type { + text-align: center; +} + +.privacy_requests thead td:first-child, +.privacy_requests tfoot td:first-child { + border-left: 4px solid #fff; +} + +.privacy_requests tbody th { + border-left: 4px solid #fff; + background: #fff; + box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); +} + +.privacy_requests tbody td { + background: #fff; + box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); +} + +.privacy_requests .status-request-confirmed th, +.privacy_requests .status-request-confirmed td { + background-color: #f7fcfe; + border-left-color: #00a0d2; +} + +.privacy_requests .status-request-failed th, +.privacy_requests .status-request-failed td { + background-color: #fef7f1; + border-left-color: #d64d21; +} + +.status-label { + font-weight: bold; +} + +.status-label.status-request-pending { + font-weight: normal; + font-style: italic; + color: #6c7781; +} + +.status-label.status-request-failed { + color: #aa0000; + font-weight: bold; +} + +.wp-privacy-request-form { + clear: both; +} + +.wp-privacy-request-form-field { + margin: 1.5em 0; +} + +.wp-privacy-request-form label { + font-weight: bold; + line-height: 1.5; + padding-bottom: .5em; + display: block; +} + +.wp-privacy-request-form input { + line-height: 1.5; + margin: 0; +} + +.email-personal-data::before { + display: inline-block; + font: normal 20px/1 dashicons; + margin: 3px 5px 0 -2px; + speak: none; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + vertical-align: top; +} + +.email-personal-data--sending::before { + color: #f56e28; + content: "\f463"; + -webkit-animation: rotation 2s infinite linear; + animation: rotation 2s infinite linear; +} + +.email-personal-data--sent::before { + color: #79ba49; + content: "\f147"; +} + /* =Media Queries -------------------------------------------------------------- */ @@ -1404,85 +1517,6 @@ table.form-table td .updated p { } } - -/* Privacy */ - -.privacy_requests .column-email { - width: 40%; -} -.privacy_requests .column-type { - text-align: center; -} -.privacy_requests thead td:first-child, -.privacy_requests tfoot td:first-child { - border-left: 4px solid #fff; -} -.privacy_requests tbody th { - border-left: 4px solid #fff; - background: #fff; - box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); -} -.privacy_requests tbody td { - background: #fff; - box-shadow: inset 0 -1px 0 rgba(0,0,0,0.1); -} -.privacy_requests .status-request-confirmed th, -.privacy_requests .status-request-confirmed td { - background-color: #f7fcfe; - border-left-color: #00a0d2; -} -.privacy_requests .status-request-failed th, -.privacy_requests .status-request-failed td { - background-color: #fef7f1; - border-left-color: #d64d21; -} -.status-label { - font-weight: bold; -} -.status-label.status-request-pending { - font-weight: normal; - font-style: italic; - color: #6c7781; -} -.status-label.status-request-failed { - color: #aa0000; - font-weight: bold; -} -.wp-privacy-request-form { - clear: both; -} -.wp-privacy-request-form-field { - margin: 1.5em 0; -} -.wp-privacy-request-form label { - font-weight: bold; - line-height: 1.5; - padding-bottom: .5em; - display: block; -} -.wp-privacy-request-form input { - line-height: 1.5; - margin: 0; -} -.email-personal-data::before { - display: inline-block; - font: normal 20px/1 dashicons; - margin: 3px 5px 0 -2px; - speak: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - vertical-align: top; -} -.email-personal-data--sending::before { - color: #f56e28; - content: "\f463"; - -webkit-animation: rotation 2s infinite linear; - animation: rotation 2s infinite linear; -} -.email-personal-data--sent::before { - color: #79ba49; - content: "\f147"; -} @-webkit-keyframes rotation { 0% { -webkit-transform: rotate(0deg); @@ -1493,6 +1527,7 @@ table.form-table td .updated p { transform: rotate(359deg); } } + @keyframes rotation { 0% { -webkit-transform: rotate(0deg); diff --git a/src/wp-admin/privacy.php b/src/wp-admin/privacy.php index fd072baf7c..c4ec307396 100644 --- a/src/wp-admin/privacy.php +++ b/src/wp-admin/privacy.php @@ -28,7 +28,11 @@ if ( ! empty( $action ) ) { add_settings_error( 'page_for_privacy_policy', 'page_for_privacy_policy', - __( 'Privacy policy page updated successfully.' ), + sprintf( + // translators: URL to Customizer -> Menus + __( 'Privacy policy page updated successfully. Remember to update your menus!' ), + 'customize.php?autofocus[panel]=nav_menus' + ), 'updated' ); } elseif ( 'create-privacy-page' === $action ) { @@ -50,10 +54,15 @@ if ( ! empty( $action ) ) { ); } else { update_option( 'wp_page_for_privacy_policy', $privacy_policy_page_id ); + add_settings_error( 'page_for_privacy_policy', 'page_for_privacy_policy', - __( 'Privacy policy page created successfully.' ), + sprintf( + // translators: URL to edit Privacy Policy page + __( 'Your Privacy Policy page created successfully. You’ll want to review and edit your policy next.' ), + 'post.php?post=' . $privacy_policy_page_id . '&action=edit' + ), 'updated' ); } @@ -62,38 +71,41 @@ if ( ! empty( $action ) ) { // If a privacy policy page ID is available, make sure the page actually exists. If not, display an error. $privacy_policy_page_exists = false; -$privacy_policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); +$privacy_policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); if ( ! empty( $privacy_policy_page_id ) ) { - $privacy_policy_page = get_post( $privacy_policy_page_id ); - if ( ! $privacy_policy_page instanceof WP_Post ) { + + $privacy_policy_page = get_post( $privacy_policy_page_id ); + + if ( ! $privacy_policy_page instanceof WP_Post ) { + add_settings_error( + 'page_for_privacy_policy', + 'page_for_privacy_policy', + __( 'The currently selected privacy policy page does not exist. Please create or select new page.' ), + 'error' + ); + } else { + if ( 'trash' === $privacy_policy_page->post_status ) { add_settings_error( 'page_for_privacy_policy', 'page_for_privacy_policy', - __( 'The currently selected privacy policy page does not exist. Please create or select new page.' ), + sprintf( + // translators: URL to Pages Trash. + __( 'The currently selected privacy policy page is in the trash. Please create or select new privacy policy page or restore the current page.' ), + 'edit.php?post_status=trash&post_type=page' + ), 'error' ); } else { - if ( 'trash' === $privacy_policy_page->post_status ) { - add_settings_error( - 'page_for_privacy_policy', - 'page_for_privacy_policy', - sprintf( - __( 'The currently selected privacy policy page is in the trash. Please create or select new privacy policy page or restore the current page.' ), - 'edit.php?post_status=trash&post_type=page' - ), - 'error' - ); - } else { - $privacy_policy_page_exists = true; - } + $privacy_policy_page_exists = true; } + } } get_current_screen()->add_help_tab( array( 'id' => 'privacy', 'title' => __( 'Privacy' ), - 'content' => '

' . __( 'This page provides tools with which you can manage your user\'s personal data and site\'s privacy policy.' ) . '

', + 'content' => '

' . __( 'This page provides tools with which you can manage your user’s personal data and site’s privacy policy.' ) . '

', ) ); get_current_screen()->set_help_sidebar( @@ -107,25 +119,35 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );

- -

- +

+

+ + + +

+

+ + + + +

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

+

Edit or view your privacy policy.' ), + // translators: %1$s URL to Edit Page, %2$s URL to View Page + __( 'Edit or view your privacy policy page content.' ), $edit_href, $view_href ); @@ -134,27 +156,25 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); - - +
+
- - - - - - -
- + +
+ 'page_for_privacy_policy', @@ -166,37 +186,26 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); ); wp_nonce_field( 'set-privacy-page' ); - submit_button( __( 'Set Page' ), 'primary', 'submit', true, array( 'id' => 'set-page' ) ); + submit_button( __( 'Use This Page' ), 'primary', 'submit', false, array( 'id' => 'set-page' ) ); + ?> +
+ +
+ + + + + 'create-page' ) ); ?>
-
- - 'create-page' ) ); - - ?> -
-

-