Ticket #24832: 24832.diff
| File 24832.diff, 3.1 KB (added by , 13 years ago) |
|---|
-
wp-admin/includes/template.php
final class WP_Internal_Pointers { 1734 1734 $registered_pointers = array( 1735 1735 'index.php' => 'wp330_toolbar', 1736 1736 'post-new.php' => 'wp350_media', 1737 'post.php' => 'wp350_media', 1737 'post.php' => array( 'wp350_media', 'wp360_revisions' ), 1738 'edit.php' => 'wp360_locks', 1738 1739 'themes.php' => array( 'wp330_saving_widgets', 'wp340_customize_current_theme_link' ), 1739 1740 'appearance_page_custom-header' => 'wp340_choose_image_from_library', 1740 1741 'appearance_page_custom-background' => 'wp340_choose_image_from_library', … … final class WP_Internal_Pointers { 1751 1752 'wp340_customize_current_theme_link' => array( 'edit_theme_options' ), 1752 1753 'wp340_choose_image_from_library' => array( 'edit_theme_options' ), 1753 1754 'wp350_media' => array( 'upload_files' ), 1755 'wp360_revisions' => array( 'edit_posts' ), 1756 'wp360_locks' => array( 'read' ), 1754 1757 ); 1755 1758 1756 1759 // Get dismissed pointers … … final class WP_Internal_Pointers { 1810 1813 }); 1811 1814 1812 1815 setup = function() { 1813 $('<?php echo $selector; ?>').pointer( options ).pointer('open'); 1816 if ( $('<?php echo $selector; ?>').pointer( options ).pointer('open').length < 1 ) { 1817 if ( options.position.defer_loading ) { 1818 setTimeout( setup, 3000 ); 1819 } 1820 } 1814 1821 }; 1815 1822 1816 1823 if ( options.position && options.position.defer_loading ) … … final class WP_Internal_Pointers { 1900 1907 ) ); 1901 1908 } 1902 1909 1910 public static function pointer_wp360_revisions() { 1911 $content = '<h3>' . __( 'New Revisions Viewer' ) . '</h3>'; 1912 $content .= '<p>' . __( 'View, compare, and restore other revisions of this content on the improved revisions screen.' ) . '</p>'; 1913 1914 self::print_js( 'wp360_revisions', '.misc-pub-section.num-revisions', array( 1915 'content' => $content, 1916 'position' => array( 'edge' => is_rtl() ? 'left' : 'right', 'align' => 'center', 'my' => is_rtl() ? 'left' : 'right-14px' ), 1917 ) ); 1918 } 1919 1920 public static function pointer_wp360_locks() { 1921 $content = '<h3>' . __( 'Edit Lock' ) . '</h3>'; 1922 $content .= '<p>' . __( 'This indicates that someone is currently editing this content. Watch this screen — it will live-update when they are done!' ) . '</p>'; 1923 1924 self::print_js( 'wp360_locks', 'tr.wp-locked .locked-indicator', array( 1925 'content' => $content, 1926 'position' => array( 'edge' => 'top', 'align' => 'center', 'my' => 'top+5px', 'defer_loading' => true ), 1927 ) ); 1928 } 1929 1903 1930 /** 1904 1931 * Prevents new users from seeing existing 'new feature' pointers. 1905 1932 * 1906 1933 * @since 3.3.0 1907 1934 */ 1908 1935 public static function dismiss_pointers_for_new_users( $user_id ) { 1909 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 ' );1936 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' ); 1910 1937 } 1911 1938 } 1912 1939