diff -r c7c34916027a -r 177826044cd9 wp/wp-admin/privacy.php --- a/wp/wp-admin/privacy.php Mon Oct 14 18:06:33 2019 +0200 +++ b/wp/wp-admin/privacy.php Mon Oct 14 18:28:13 2019 +0200 @@ -39,7 +39,7 @@ ) { $privacy_page_updated_message = sprintf( /* translators: %s: URL to Customizer -> Menus */ - __( 'Privacy Policy page updated successfully. Remember to update your menus!' ), + __( 'Privacy Policy page setting updated successfully. Remember to update your menus!' ), esc_url( add_query_arg( 'autofocus[panel]', 'nav_menus', admin_url( 'customize.php' ) ) ) ); } @@ -58,7 +58,7 @@ } $privacy_policy_page_content = WP_Privacy_Policy_Content::get_default_content(); - $privacy_policy_page_id = wp_insert_post( + $privacy_policy_page_id = wp_insert_post( array( 'post_title' => __( 'Privacy Policy' ), 'post_status' => 'draft', @@ -156,35 +156,44 @@ Edit or view your Privacy Policy page content.' ), $edit_href, $view_href ); + printf( + /* translators: 1: URL to edit Privacy Policy page, 2: URL to view Privacy Policy page */ + __( 'Edit or view your Privacy Policy page content.' ), + esc_url( $edit_href ), + esc_url( $view_href ) + ); } else { - /* translators: 1: URL to edit page, 2: URL to preview page */ - printf( __( 'Edit or preview your Privacy Policy page content.' ), $edit_href, $view_href ); + 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.' ), - admin_url( 'tools.php?wp-privacy-policy-guide' ), - '', - '' - ); - - ?> -
++ 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( 'tools.php?wp-privacy-policy-guide=1' ) ), + '', + '' + ); + + ?> +
+| + | + | 'page', - 'posts_per_page' => 1, - 'post_status' => array( - 'publish', - 'draft', - ), - ) ); + $has_pages = (bool) get_posts( + array( + 'post_type' => 'page', + 'posts_per_page' => 1, + 'post_status' => array( + 'publish', + 'draft', + ), + ) + ); - if ( $has_pages ) : ?> + if ( $has_pages ) : + ?> |
|---|