diff --git a/src/wp-admin/includes/class-wp-internal-pointers.php b/src/wp-admin/includes/class-wp-internal-pointers.php index 4251df3b8a..30f3d85db1 100644 --- a/src/wp-admin/includes/class-wp-internal-pointers.php +++ b/src/wp-admin/includes/class-wp-internal-pointers.php @@ -41,7 +41,7 @@ final class WP_Internal_Pointers { * ) */ $registered_pointers = array( - // None currently + 'index.php' => 'wp496_privacy', ); // Check if screen related pointer is registered @@ -65,7 +65,11 @@ final class WP_Internal_Pointers { * ) */ $caps_required = array( - // None currently + 'wp496_privacy' => array( + 'manage_privacy_options', + 'export_others_personal_data', + 'erase_others_personal_data', + ), ); // Get dismissed pointers @@ -151,6 +155,39 @@ final class WP_Internal_Pointers { public static function pointer_wp390_widgets() {} public static function pointer_wp410_dfw() {} + /** + * Display a pointer for the new privacy tools. + * + * @since 4.9.6 + */ + public static function pointer_wp496_privacy() { + $content = '
' . __( 'Create or select your site’s privacy policy page under Settings > Privacy to keep your users informed and aware.' ) . '
'; + $content .= '' . __( 'New Tools have been added to help you with personal data export and erasure requests.' ) . '
'; + + if ( is_rtl() ) { + $position = array( + 'edge' => 'right', + 'align' => 'left', + 'at' => 'left+40', + ); + } else { + $position = array( + 'edge' => 'left', + 'align' => 'right', + 'at' => 'right-40 bottom' + ); + } + + $js_args = array( + 'content' => $content, + 'position' => $position, + ); + self::print_js( 'wp496_privacy', '#menu-tools', $js_args ); + } + /** * Prevents new users from seeing existing 'new feature' pointers. * diff --git a/src/wp-includes/css/wp-pointer.css b/src/wp-includes/css/wp-pointer.css index ed37b8443c..a0be97b4cc 100644 --- a/src/wp-includes/css/wp-pointer.css +++ b/src/wp-includes/css/wp-pointer.css @@ -36,6 +36,10 @@ -moz-osx-font-smoothing: grayscale; } +.wp-pointer-content h4 { + margin: 1.33em 15px; +} + .wp-pointer-content p { padding: 0 15px; }