diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index d4265331a5..66f3b7b3e1 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1734,7 +1734,8 @@ final class WP_Internal_Pointers { $registered_pointers = array( 'index.php' => 'wp330_toolbar', 'post-new.php' => 'wp350_media', - 'post.php' => 'wp350_media', + 'post.php' => array( 'wp350_media', 'wp360_revisions' ), + 'edit.php' => 'wp360_locks', 'themes.php' => array( 'wp330_saving_widgets', 'wp340_customize_current_theme_link' ), 'appearance_page_custom-header' => 'wp340_choose_image_from_library', 'appearance_page_custom-background' => 'wp340_choose_image_from_library', @@ -1751,6 +1752,8 @@ final class WP_Internal_Pointers { 'wp340_customize_current_theme_link' => array( 'edit_theme_options' ), 'wp340_choose_image_from_library' => array( 'edit_theme_options' ), 'wp350_media' => array( 'upload_files' ), + 'wp360_revisions' => array( 'edit_posts' ), + 'wp360_locks' => array( 'read' ), ); // Get dismissed pointers @@ -1900,13 +1903,36 @@ final class WP_Internal_Pointers { ) ); } + public static function pointer_wp360_revisions() { + $content = '

' . __( 'Compare Revisions' ) . '

'; + $content .= '

' . __( 'View, compare, and restore other versions of this content on the improved revisions screen.' ) . '

'; + + self::print_js( 'wp360_revisions', '.misc-pub-section.num-revisions', array( + 'content' => $content, + 'position' => array( 'edge' => is_rtl() ? 'left' : 'right', 'align' => 'center', 'my' => is_rtl() ? 'left' : 'right-14px' ), + ) ); + } + + public static function pointer_wp360_locks() { + $content = '

' . __( 'Edit Lock' ) . '

'; + $content .= '

' . __( 'Someone else is editing this. No need to refresh; the lock will disappear when they’re done.' ) . '

'; + + if ( ! is_multi_author() ) + return; + + self::print_js( 'wp360_locks', 'tr.wp-locked .locked-indicator', array( + 'content' => $content, + 'position' => array( 'edge' => 'left', 'align' => 'left' ), + ) ); + } + /** * Prevents new users from seeing existing 'new feature' pointers. * * @since 3.3.0 */ public static function dismiss_pointers_for_new_users( $user_id ) { - add_user_meta( $user_id, 'dismissed_wp_pointers', 'wp330_toolbar,wp330_saving_widgets,wp340_choose_image_from_library,wp340_customize_current_theme_link,wp350_media' ); + add_user_meta( $user_id, 'dismissed_wp_pointers', 'wp330_toolbar,wp330_saving_widgets,wp340_choose_image_from_library,wp340_customize_current_theme_link,wp350_media,wp360_revisions,wp360_locks' ); } }