From ba7b8cd8a0dc92d51dfbcbc8d0407ba632f0c9ce Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sat, 10 Mar 2018 14:01:31 +0000 Subject: [PATCH] Accessibility improvements for the Privacy Tools screen. Propr afercia. See #43435. Built from https://develop.svn.wordpress.org/trunk@42823 git-svn-id: http://core.svn.wordpress.org/trunk@42653 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/privacy.php | 117 ++++++++++++++++++++-------------------- wp-includes/version.php | 2 +- 2 files changed, 60 insertions(+), 59 deletions(-) diff --git a/wp-admin/privacy.php b/wp-admin/privacy.php index 3630260f19..fd072baf7c 100644 --- a/wp-admin/privacy.php +++ b/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' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 0e576064db..9bf65c40ea 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42822'; +$wp_version = '5.0-alpha-42823'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
- + + ?> +
- -
- - -
- + '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' ) ); + + ?>