diff --git a/src/wp-admin/privacy.php b/src/wp-admin/privacy.php index 3630260f19..fd072baf7c 100644 --- a/src/wp-admin/privacy.php +++ b/src/wp-admin/privacy.php @@ -60,7 +60,7 @@ if ( ! empty( $action ) ) { } } -// If a privacy policy page ID is available, make sure the page actually exists. If not, display a warning +// 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' ); @@ -71,7 +71,7 @@ if ( ! empty( $privacy_policy_page_id ) ) { 'page_for_privacy_policy', 'page_for_privacy_policy', __( 'The currently selected privacy policy page does not exist. Please create or select new page.' ), - 'warning' + 'error' ); } else { if ( 'trash' === $privacy_policy_page->post_status ) { @@ -90,8 +90,6 @@ if ( ! empty( $privacy_policy_page_id ) ) { } } -$title = __( 'Privacy Tools' ); - get_current_screen()->add_help_tab( array( 'id' => 'privacy', 'title' => __( 'Privacy' ), @@ -107,71 +105,70 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-

+

-

- - - if ( $privacy_policy_page_exists ) { - $edit_href = add_query_arg( - array( - 'post' => $privacy_policy_page_id, - 'action' => 'edit', - ), - admin_url( 'post.php' ) - ); - $view_href = get_permalink( $privacy_policy_page_id ); - - ?> - - - - $privacy_policy_page_id, + 'action' => 'edit', + ), + admin_url( 'post.php' ) + ); + $view_href = get_permalink( $privacy_policy_page_id ); ?> +

+ Edit or view your privacy policy.' ), + $edit_href, + $view_href + ); + ?> +

+ + +
- Edit or view your privacy policy.' ), - $edit_href, - $view_href - ); - ?> -
@@ -184,8 +181,12 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
- + + ?> +
- -
- - -
- + 'page_for_privacy_policy', + 'show_option_none' => __( '— Select —' ), + 'option_none_value' => '0', + 'selected' => $privacy_policy_page_id, + 'post_status' => array( 'draft', 'publish' ), + ) + ); + + wp_nonce_field( 'set-privacy-page' ); + submit_button( __( 'Set Page' ), 'primary', 'submit', true, array( 'id' => 'set-page' ) ); + + ?>
- - + 'create-page' ) ); + + ?>