Skip to content

Commit

Permalink
Privacy: Remove privacy feature related admin pointers.
Browse files Browse the repository at this point in the history
In 4.9.6, several new privacy related features were introduced. Admin pointers were included to make administrators aware of these features. They have served their purpose and can now go silently into the night.

Props garrett-eclipse, desrosj, xkon.
Fixes #45999.
Built from https://develop.svn.wordpress.org/trunk@44787


git-svn-id: http://core.svn.wordpress.org/trunk@44619 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
desrosj committed Mar 4, 2019
1 parent 5b54c00 commit 9bbf751
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 41 deletions.
44 changes: 4 additions & 40 deletions wp-admin/includes/class-wp-internal-pointers.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static function enqueue_scripts( $hook_suffix ) {
* )
*/
$registered_pointers = array(
'index.php' => 'wp496_privacy',
//None currently.
);

// Check if screen related pointer is registered
Expand All @@ -65,11 +65,7 @@ public static function enqueue_scripts( $hook_suffix ) {
* )
*/
$caps_required = array(
'wp496_privacy' => array(
'manage_privacy_options',
'export_others_personal_data',
'erase_others_personal_data',
),
// None currently.
);

// Get dismissed pointers
Expand Down Expand Up @@ -154,39 +150,7 @@ public static function pointer_wp360_revisions() {}
public static function pointer_wp360_locks() {}
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 = '<h3>' . __( 'Personal Data and Privacy' ) . '</h3>';
$content .= '<h4>' . __( 'Personal Data Export and Erasure' ) . '</h4>';
$content .= '<p>' . __( 'New <strong>Tools</strong> have been added to help you with personal data export and erasure requests.' ) . '</p>';
$content .= '<h4>' . __( 'Privacy Policy' ) . '</h4>';
$content .= '<p>' . __( 'Create or select your site&#8217;s privacy policy page under <strong>Settings &gt; Privacy</strong> to keep your users informed and aware.' ) . '</p>';

if ( is_rtl() ) {
$position = array(
'edge' => 'right',
'align' => 'bottom',
);
} else {
$position = array(
'edge' => 'left',
'align' => 'bottom',
);
}

$js_args = array(
'content' => $content,
'position' => $position,
'pointerClass' => 'wp-pointer arrow-bottom',
'pointerWidth' => 420,
);
self::print_js( 'wp496_privacy', '#menu-tools', $js_args );
}
public static function pointer_wp496_privacy() {}

/**
* Prevents new users from seeing existing 'new feature' pointers.
Expand All @@ -196,6 +160,6 @@ public static function pointer_wp496_privacy() {
* @param int $user_id User ID.
*/
public static function dismiss_pointers_for_new_users( $user_id ) {
add_user_meta( $user_id, 'dismissed_wp_pointers', 'wp496_privacy' );
add_user_meta( $user_id, 'dismissed_wp_pointers', '' );
}
}
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-alpha-44786';
$wp_version = '5.2-alpha-44787';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 9bbf751

Please sign in to comment.