Privacy: Use a consistent case for "Privacy Policy page" on Privacy Settings screen.

Props XpertOne, idea15, garrett-eclipse.
Fixes #44130.

git-svn-id: https://develop.svn.wordpress.org/trunk@43508 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2018-07-19 12:09:31 +00:00
parent a1f6ba5477
commit ffdc5e6827

View File

@ -22,7 +22,7 @@ if ( ! empty( $action ) ) {
$privacy_policy_page_id = isset( $_POST['page_for_privacy_policy'] ) ? (int) $_POST['page_for_privacy_policy'] : 0; $privacy_policy_page_id = isset( $_POST['page_for_privacy_policy'] ) ? (int) $_POST['page_for_privacy_policy'] : 0;
update_option( 'wp_page_for_privacy_policy', $privacy_policy_page_id ); update_option( 'wp_page_for_privacy_policy', $privacy_policy_page_id );
$privacy_page_updated_message = __( 'Privacy policy page updated successfully.' ); $privacy_page_updated_message = __( 'Privacy Policy page updated successfully.' );
if ( $privacy_policy_page_id ) { if ( $privacy_policy_page_id ) {
/* /*
@ -39,7 +39,7 @@ if ( ! empty( $action ) ) {
) { ) {
$privacy_page_updated_message = sprintf( $privacy_page_updated_message = sprintf(
/* translators: %s: URL to Customizer -> Menus */ /* translators: %s: URL to Customizer -> Menus */
__( 'Privacy policy page updated successfully. Remember to <a href="%s">update your menus</a>!' ), __( 'Privacy Policy page updated successfully. Remember to <a href="%s">update your menus</a>!' ),
esc_url( add_query_arg( 'autofocus[panel]', 'nav_menus', admin_url( 'customize.php' ) ) ) esc_url( add_query_arg( 'autofocus[panel]', 'nav_menus', admin_url( 'customize.php' ) ) )
); );
} }
@ -72,7 +72,7 @@ if ( ! empty( $action ) ) {
add_settings_error( add_settings_error(
'page_for_privacy_policy', 'page_for_privacy_policy',
'page_for_privacy_policy', 'page_for_privacy_policy',
__( 'Unable to create privacy policy page.' ), __( 'Unable to create Privacy Policy page.' ),
'error' 'error'
); );
} else { } else {
@ -84,7 +84,7 @@ if ( ! empty( $action ) ) {
} }
} }
// If a privacy policy page ID is available, make sure the page actually exists. If not, display an error. // 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_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' );
@ -96,7 +96,7 @@ if ( ! empty( $privacy_policy_page_id ) ) {
add_settings_error( add_settings_error(
'page_for_privacy_policy', 'page_for_privacy_policy',
'page_for_privacy_policy', 'page_for_privacy_policy',
__( 'The currently selected privacy policy page does not exist. Please create or select new page.' ), __( 'The currently selected Privacy Policy page does not exist. Please create or select new page.' ),
'error' 'error'
); );
} else { } else {
@ -106,7 +106,7 @@ if ( ! empty( $privacy_policy_page_id ) ) {
'page_for_privacy_policy', 'page_for_privacy_policy',
sprintf( sprintf(
/* translators: URL to Pages Trash */ /* translators: URL to Pages Trash */
__( 'The currently selected privacy policy page is in the trash. Please create or select new privacy policy page or <a href="%s">restore the current page</a>.' ), __( 'The currently selected Privacy Policy page is in the trash. Please create or select new Privacy Policy page or <a href="%s">restore the current page</a>.' ),
'edit.php?post_status=trash&post_type=page' 'edit.php?post_status=trash&post_type=page'
), ),
'error' 'error'
@ -127,16 +127,16 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<h1><?php echo $title; ?></h1> <h1><?php echo $title; ?></h1>
<h2><?php _e( 'Privacy Policy page' ); ?></h2> <h2><?php _e( 'Privacy Policy page' ); ?></h2>
<p> <p>
<?php _e( 'As a website owner, you may need to follow national or international privacy laws. For example, you may need to create and display a privacy policy.' ); ?> <?php _e( 'As a website owner, you may need to follow national or international privacy laws. For example, you may need to create and display a Privacy Policy.' ); ?>
<?php _e( 'If you already have a privacy policy page, please select it below. If not, please create one.' ); ?> <?php _e( 'If you already have a Privacy Policy page, please select it below. If not, please create one.' ); ?>
</p> </p>
<p> <p>
<?php _e( 'The new page will include help and suggestions for your privacy policy.' ); ?> <?php _e( 'The new page will include help and suggestions for your Privacy Policy.' ); ?>
<?php _e( 'However, it is your responsibility to use those resources correctly, to provide the information that your privacy policy requires, and to keep that information current and accurate.' ); ?> <?php _e( 'However, it is your responsibility to use those resources correctly, to provide the information that your Privacy Policy requires, and to keep that information current and accurate.' ); ?>
</p> </p>
<p> <p>
<?php _e( 'After your privacy policy page is set, we suggest that you edit it.' ); ?> <?php _e( 'After your Privacy Policy page is set, we suggest that you edit it.' ); ?>
<?php _e( 'We would also suggest reviewing your privacy policy from time to time, especially after installing or updating any themes or plugins. There may be changes or new suggested information for you to consider adding to your policy.' ); ?> <?php _e( 'We would also suggest reviewing your Privacy Policy from time to time, especially after installing or updating any themes or plugins. There may be changes or new suggested information for you to consider adding to your policy.' ); ?>
</p> </p>
<?php <?php
@ -157,10 +157,10 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
if ( 'publish' === get_post_status( $privacy_policy_page_id ) ) { if ( 'publish' === get_post_status( $privacy_policy_page_id ) ) {
/* translators: 1: URL to edit page, 2: URL to view page */ /* translators: 1: URL to edit page, 2: URL to view page */
printf( __( '<a href="%1$s">Edit</a> or <a href="%2$s">view</a> your privacy policy page content.' ), $edit_href, $view_href ); printf( __( '<a href="%1$s">Edit</a> or <a href="%2$s">view</a> your Privacy Policy page content.' ), $edit_href, $view_href );
} else { } else {
/* translators: 1: URL to edit page, 2: URL to preview page */ /* translators: 1: URL to edit page, 2: URL to preview page */
printf( __( '<a href="%1$s">Edit</a> or <a href="%2$s">preview</a> your privacy policy page content.' ), $edit_href, $view_href ); printf( __( '<a href="%1$s">Edit</a> or <a href="%2$s">preview</a> your Privacy Policy page content.' ), $edit_href, $view_href );
} }
?> ?>