2119 | | |
2120 | | /** |
2121 | | * @static |
2122 | | */ |
2123 | | public static function pointer_wp360_locks() { |
2124 | | if ( ! is_multi_author() ) { |
2125 | | return; |
2126 | | } |
2127 | | |
2128 | | $content = '<h3>' . __( 'Edit Lock' ) . '</h3>'; |
2129 | | $content .= '<p>' . __( 'Someone else is editing this. No need to refresh; the lock will disappear when they’re done.' ) . '</p>'; |
2130 | | |
2131 | | self::print_js( 'wp360_locks', 'tr.wp-locked .locked-indicator', array( |
2132 | | 'content' => $content, |
2133 | | 'position' => array( 'edge' => 'left', 'align' => 'left' ), |
2134 | | ) ); |
2135 | | } |
2136 | | |
2137 | | /** |
2138 | | * @static |
2139 | | */ |
2140 | | public static function pointer_wp390_widgets() { |
2141 | | if ( ! current_theme_supports( 'widgets' ) ) { |
2142 | | return; |
2143 | | } |
2144 | | |
2145 | | $content = '<h3>' . __( 'New Feature: Live Widget Previews' ) . '</h3>'; |
2146 | | $content .= '<p>' . __( 'Add, edit, and play around with your widgets from the Customizer.' ) . ' ' . __( 'Preview your changes in real-time and only save them when you’re ready.' ) . '</p>'; |
2147 | | |
2148 | | if ( 'themes' === get_current_screen()->id ) { |
2149 | | $selector = '.theme.active .customize'; |
2150 | | $position = array( 'edge' => is_rtl() ? 'right' : 'left', 'align' => 'center' ); |
2151 | | } else { |
2152 | | $selector = 'a[href^="customize.php"]'; |
2153 | | if ( is_rtl() ) { |
2154 | | $position = array( 'edge' => 'right', 'align' => 'center', 'my' => 'right-5px' ); |
2155 | | } else { |
2156 | | $position = array( 'edge' => 'left', 'align' => 'center', 'my' => 'left-5px' ); |
2157 | | } |
2158 | | } |
2159 | | |
2160 | | self::print_js( 'wp390_widgets', $selector, array( |
2161 | | 'content' => $content, |
2162 | | 'position' => $position, |
2163 | | ) ); |
2164 | | } |
2165 | | |
2166 | | /** |
2167 | | * @static |
2168 | | * |
2169 | | * @global bool $_wp_editor_expand |
2170 | | */ |
2171 | | public static function pointer_wp410_dfw() { |
2172 | | // Don't show when editor-scrolling is not used. |
2173 | | if ( empty( $GLOBALS['_wp_editor_expand'] ) ) { |
2174 | | return; |
2175 | | } |
2176 | | |
2177 | | $content = '<h3>' . __( 'Distraction-Free Writing' ) . '</h3>'; |
2178 | | $content .= '<p>' . __( 'Enable distraction-free writing mode, and everything surrounding the editor will fade away when you start typing. Move your mouse out of the editor to reveal everything again.' ) . '</p>'; |
2179 | | |
2180 | | if ( is_rtl() ) { |
2181 | | $position = array( 'edge' => 'left', 'align' => 'center', 'my' => 'left+40 top-11', 'at' => 'left top' ); |
2182 | | } else { |
2183 | | $position = array( 'edge' => 'right', 'align' => 'center', 'my' => 'right-40 top-11', 'at' => 'right top' ); |
2184 | | } |
2185 | | |
2186 | | self::print_js( 'wp410_dfw', '#wp-content-wrap', array( |
2187 | | 'content' => $content, |
2188 | | 'position' => $position, |
2189 | | ) ); |
2190 | | } |
| 2115 | public static function pointer_wp360_locks() {} |
| 2116 | public static function pointer_wp390_widgets() {} |
| 2117 | public static function pointer_wp410_dfw() {} |