Privacy: Remove privacy feature related admin pointers.
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. git-svn-id: https://develop.svn.wordpress.org/trunk@44787 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
636af9078d
commit
0e59ee558d
@ -41,7 +41,7 @@ final class WP_Internal_Pointers {
|
|||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
$registered_pointers = array(
|
$registered_pointers = array(
|
||||||
'index.php' => 'wp496_privacy',
|
//None currently.
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check if screen related pointer is registered
|
// Check if screen related pointer is registered
|
||||||
@ -65,11 +65,7 @@ final class WP_Internal_Pointers {
|
|||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
$caps_required = array(
|
$caps_required = array(
|
||||||
'wp496_privacy' => array(
|
// None currently.
|
||||||
'manage_privacy_options',
|
|
||||||
'export_others_personal_data',
|
|
||||||
'erase_others_personal_data',
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Get dismissed pointers
|
// Get dismissed pointers
|
||||||
@ -154,39 +150,7 @@ final class WP_Internal_Pointers {
|
|||||||
public static function pointer_wp360_locks() {}
|
public static function pointer_wp360_locks() {}
|
||||||
public static function pointer_wp390_widgets() {}
|
public static function pointer_wp390_widgets() {}
|
||||||
public static function pointer_wp410_dfw() {}
|
public static function pointer_wp410_dfw() {}
|
||||||
|
public static function pointer_wp496_privacy() {}
|
||||||
/**
|
|
||||||
* 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’s privacy policy page under <strong>Settings > 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 );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prevents new users from seeing existing 'new feature' pointers.
|
* Prevents new users from seeing existing 'new feature' pointers.
|
||||||
@ -196,6 +160,6 @@ final class WP_Internal_Pointers {
|
|||||||
* @param int $user_id User ID.
|
* @param int $user_id User ID.
|
||||||
*/
|
*/
|
||||||
public static function dismiss_pointers_for_new_users( $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', '' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user