Changeset 44749 for trunk/src/wp-admin/about.php
- Timestamp:
- 02/19/2019 01:56:43 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/about.php
r44735 r44749 26 26 <p class="about-text"><?php printf( __( 'Thank you for updating to the latest version!' ), $display_version ); ?></p> 27 27 28 <?php29 if (30 // Was the Gutenberg plugin installed before upgrading to 5.0.x?31 get_option( 'upgrade_500_was_gutenberg_active' ) == '1' &&32 current_user_can( 'activate_plugins' ) &&33 // Has it not been reactivated since?34 is_plugin_inactive( 'gutenberg/gutenberg.php' ) &&35 // Is it still installed?36 file_exists( WP_PLUGIN_DIR . '/gutenberg/gutenberg.php' )37 ) :38 ?>39 <div class="about-text" style="font-style:italic;">40 <?php41 printf(42 /* translators: 1: WordPress version, 2: HTML start tag of link, 3: HTML end tag of link */43 __( 'The Gutenberg plugin has been deactivated, as the features are now included in WordPress %1$s by default. If you’d like to continue to test the upcoming changes in the WordPress editing experience, please %2$sreactivate the Gutenberg plugin%3$s.' ),44 $display_version,45 '<a href="' . esc_url( self_admin_url( 'plugins.php?s=gutenberg&plugin_status=all' ) ) . '">',46 '</a>'47 );48 ?>49 </div>50 <?php elseif ( ! file_exists( WP_PLUGIN_DIR . '/classic-editor/classic-editor.php' ) ) : ?>51 <p class="about-text">52 ℹ <a href="#classic-editor"><?php _e( 'Learn how to keep using the old editor.' ); ?></a>53 </p>54 <?php endif; ?>55 56 28 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div> 57 29 … … 63 35 </h2> 64 36 65 <div class="feature-section one-col"> 66 <div class="col"> 67 <h2><?php _e( 'A Little Better Every Day' ); ?></h2> 68 </div> 69 </div> 70 71 <div class="feature-section one-col"> 72 <div class="col"> 73 <picture> 74 <img src="https://make.wordpress.org/core/files/2019/01/Servehappy-Notice-with-custom-link.png" alt="" width="200"> 75 </picture> 37 <h2 class="feature-section-header"><?php _e( 'A Little Better Every Day' ); ?></h2> 38 39 <div class="feature-section headline-feature one-col"> 40 <div class="col"> 41 <div class="inline-svg"> 42 <img src="https://s.w.org/images/core/5.1/update.svg" alt=""> 43 </div> 76 44 <p><?php _e( 'You’ve successfully upgraded to WordPress 5.1! Following WordPress 5.0—a major release which introduced the new block editor—5.1 focuses on polish, in particular by improving overall performance of the editor. In addition, this release paves the way for a better, faster, and more secure WordPress with some essential tools for site administrators and developers.' ); ?></p> 77 45 </div> 78 46 </div> 79 47 80 <div class="feature-section one-col"> 81 <div class="col"> 82 <h2><?php _e( 'Site Health' ); ?></h2> 48 <div class="feature-section one-col is-wide wp-clearfix"> 49 <div class="col"> 50 <h3><?php _e( 'Site Health' ); ?></h2> 51 <div class="inline-svg alignright"> 52 <img src="https://s.w.org/images/core/5.1/site-health.svg" alt=""> 53 </div> 83 54 <p><?php printf( __( 'With security and speed in mind, this release introduces WordPress’s first <a href="%s">Site Health</a> features. WordPress will start showing notices to administrators of sites that run long-outdated versions of PHP, which is the programming language that powers WordPress.' ), 'https://make.wordpress.org/core/2019/01/14/php-site-health-mechanisms-in-5-1/' ); ?></p> 84 55 85 56 <p><?php _e( 'When installing new plugins, WordPress’s Site Health features will check whether a plugin requires a version of PHP incompatible with your site. If so, WordPress will prevent you from installing that plugin.' ); ?></p> 86 </div> 87 </div> 88 89 90 <div class="feature-section one-col cta"> 91 <?php 92 $response = wp_check_php_version(); 93 if ( $response && isset( $response['is_acceptable'] ) && ! $response['is_acceptable'] && current_user_can( 'update_php' ) ) : 94 ?> 95 <p><em><?php _e( 'WordPress has detected your site is running an outdated version of PHP. You will see this notice on your dashboard with instructions for contacting your host.' ); ?></em></p> 96 <?php endif; ?> 97 98 <div class="col"> 99 <a class="button button-primary button-hero" href=""><?php _e( 'Learn more about updating PHP' ); ?></a> 100 </div> 101 </div> 102 103 <div class="feature-section one-col"> 104 <div class="col"> 105 <h2><?php _e( 'Editor Performance' ); ?></h2> 57 58 <?php 59 $response = wp_check_php_version(); 60 if ( $response && isset( $response['is_acceptable'] ) && ! $response['is_acceptable'] && current_user_can( 'update_php' ) ) : 61 ?> 62 <p><em><?php _e( 'WordPress has detected your site is running an outdated version of PHP. You will see this notice on your dashboard with instructions for contacting your host.' ); ?></em></p> 63 <?php endif; ?> 64 65 <p><a class="button button-default button-hero" href="<?php echo esc_url( wp_get_update_php_url() ); ?>"><?php _e( 'Learn more about updating PHP' ); ?></a></p> 66 </div> 67 </div> 68 69 <div class="feature-section one-col is-wide wp-clearfix"> 70 <div class="col"> 71 <h3><?php _e( 'Editor Performance' ); ?></h2> 72 <div class="inline-svg alignright"> 73 <img src="https://s.w.org/images/core/5.1/editor-performance.svg" alt=""> 74 </div> 106 75 <p><?php _e( 'Introduced in WordPress 5.0, the new block editor continues to improve. Most significantly, WordPress 5.1 includes solid performance improvements within the editor. The editor should feel a little quicker to start, and typing should feel smoother. Nevertheless, expect more performance improvements in the next releases.' ); ?></p> 107 </div> 108 </div> 109 110 <?php if ( current_user_can( 'edit_posts' ) ) { ?> 111 <div class="feature-section one-col cta"> 112 <div class="col"> 113 <a class="button button-primary button-hero" href="<?php echo esc_url( admin_url( 'post-new.php' ) ); ?>"><?php _e( 'Build your first post' ); ?></a> 114 </div> 115 </div> 116 <?php } ?> 76 <?php if ( current_user_can( 'edit_posts' ) ) : ?> 77 <p><a class="button button-default button-hero" href="<?php echo esc_url( admin_url( 'post-new.php' ) ); ?>"><?php _e( 'Build your first post' ); ?></a></p> 78 <?php endif; ?> 79 </div> 80 </div> 117 81 118 82 <hr /> 119 83 120 <div class="under-the-hood feature-section"> 121 <div class="col"> 122 <h2><?php _e( 'Developer Happiness' ); ?></h2> 123 </div> 124 </div> 84 <h3 class="under-the-hood-header"><?php _e( 'Developer Happiness' ); ?></h3> 125 85 126 86 <div class="under-the-hood feature-section three-col"> 127 87 <div class="col"> 128 <h 3><?php _e( 'Multisite Metadata' ); ?></h3>88 <h4><?php _e( 'Multisite Metadata' ); ?></h4> 129 89 <p> 130 90 <?php _e( '5.1 introduces a new database table to store metadata associated with sites and allows for the storage of arbitrary site data relevant in a multisite / network context.' ); ?> … … 134 94 </div> 135 95 <div class="col"> 136 <h 3><?php _e( 'Cron API' ); ?></h3>96 <h4><?php _e( 'Cron API' ); ?></h4> 137 97 <p> 138 98 <?php _e( 'The Cron API has been updated with new functions to assist with returning data and includes new filters for modifying cron storage. Other changes in behavior affect cron spawning on servers running FastCGI and PHP-FPM versions 7.0.16 and above.' ); ?> … … 142 102 </div> 143 103 <div class="col"> 144 <h 3><?php _e( 'New JS Build Processes' ); ?></h3>104 <h4><?php _e( 'New JS Build Processes' ); ?></h4> 145 105 <p> 146 106 <?php _e( 'WordPress 5.1 features a new JavaScript build option, following the large reorganization of code started in the 5.0 release.' ); ?> … … 149 109 </p> 150 110 </div> 151 <div class="col"> 152 <h3><?php _e( 'Other Developer Goodness' ); ?></h3> 111 </div> 112 113 <div class="under-the-hood feature-section two-col"> 114 <div class="col is-span-two"> 115 <h4><?php _e( 'Other Developer Goodness' ); ?></h4> 153 116 <p> 154 117 <?php _e( 'Miscellaneous improvements include updates to values for the <code>WP_DEBUG_LOG</code> constant, new test config file constant in the test suite, new plugin action hooks, short-circuit filters for <code>wp_unique_post_slug()</code> and <code>WP_User_Query</code> and <code>count_users()</code>, a new <code>human_readable_duration</code> function, improved taxonomy metabox sanitization, limited <code>LIKE</code> support for meta keys when using <code>WP_Meta_Query</code>, a new “doing it wrong” notice when registering REST API endpoints, and more!' ); ?> … … 156 119 <?php printf( __( '<a href="%s">Read more.</a>' ), 'https://make.wordpress.org/core/2019/01/23/miscellaneous-developer-focused-changes-in-5-1/' ); ?> 157 120 </p> 158 </div> 159 </div> 160 161 <div class="under-the-hood feature-section one-col cta"> 162 <div class="col"> 163 <a class="button button-primary button-hero" href="<?php echo esc_url( 'https://developer.wordpress.org/' ); ?>"><?php _e( 'Learn how to get started' ); ?></a> 121 <p> 122 <a class="button button-default button-hero" href="<?php echo esc_url( 'https://developer.wordpress.org/' ); ?>"><?php _e( 'Learn how to get started' ); ?></a> 123 </p> 124 </div> 125 <div class="col"> 126 <div class="inline-svg"> 127 <img src="https://s.w.org/images/core/5.1/under-the-hood.svg" alt=""> 128 </div> 164 129 </div> 165 130 </div> … … 168 133 169 134 <?php if ( ! file_exists( WP_PLUGIN_DIR . '/classic-editor/classic-editor.php' ) ) : ?> 135 <h2 class="feature-section-header"><?php _e( 'Keep it Classic' ); ?></h2> 136 170 137 <div class="feature-section one-col" id="classic-editor"> 171 <div class="col">172 <h2><?php _e( 'Keep it Classic' ); ?></h2>173 </div>174 </div>175 176 <div class="full-width">177 <picture>178 <source type="image/webp" media="(max-width: 782px)" srcset="https://s.w.org/images/core/5.0/classic/Classic%20Mobile1x.webp 1x, https://s.w.org/images/core/5.0/classic/Classic%20Mobile.webp 2x" />179 <source media="(max-width: 782px)" srcset="https://s.w.org/images/core/5.0/classic/Classic%20Mobile1x.jpg 1x, https://s.w.org/images/core/5.0/classic/Classic%20Mobile.jpg 2x" />180 <source type="image/webp" srcset="https://s.w.org/images/core/5.0/classic/Classic@1x.webp 1x, https://s.w.org/images/core/5.0/classic/Classic.webp 2x" />181 <img src="https://s.w.org/images/core/5.0/classic/Classic@1x.jpg" srcset="https://s.w.org/images/core/5.0/classic/Classic@1x.jpg 1x, https://s.w.org/images/core/5.0/header/Classic.jpg 2x" alt="">182 </picture>183 </div>184 185 <div class="feature-section one-col">186 138 <div class="col"> 187 139 <p><?php _e( 'Prefer to stick with the familiar Classic Editor? No problem! Support for the Classic Editor plugin will remain in WordPress through 2021.' ); ?></p> … … 208 160 </div> 209 161 </div> 210 211 <script>212 (function( $ ) {213 $( function() {214 var $window = $( window );215 var $adminbar = $( '#wpadminbar' );216 var $sections = $( '.floating-header-section' );217 var offset = 0;218 219 // Account for Admin bar.220 if ( $adminbar.length ) {221 offset += $adminbar.height();222 }223 224 function setup() {225 $sections.each( function( i, section ) {226 var $section = $( section );227 // If the title is long, switch the layout228 var $title = $section.find( 'h2' );229 if ( $title.innerWidth() > 300 ) {230 $section.addClass( 'has-long-title' );231 }232 } );233 }234 235 var adjustScrollPosition = _.throttle( function adjustScrollPosition() {236 $sections.each( function( i, section ) {237 var $section = $( section );238 var $header = $section.find( 'h2' );239 var width = $header.innerWidth();240 var height = $header.innerHeight();241 242 if ( $section.hasClass( 'has-long-title' ) ) {243 return;244 }245 246 var sectionStart = $section.offset().top - offset;247 var sectionEnd = sectionStart + $section.innerHeight();248 var scrollPos = $window.scrollTop();249 250 // If we're scrolled into a section, stick the header251 if ( scrollPos >= sectionStart && scrollPos < sectionEnd - height ) {252 $header.css( {253 position: 'fixed',254 top: offset + 'px',255 bottom: 'auto',256 width: width + 'px'257 } );258 // If we're at the end of the section, stick the header to the bottom259 } else if ( scrollPos >= sectionEnd - height && scrollPos < sectionEnd ) {260 $header.css( {261 position: 'absolute',262 top: 'auto',263 bottom: 0,264 width: width + 'px'265 } );266 // Unstick the header267 } else {268 $header.css( {269 position: 'static',270 top: 'auto',271 bottom: 'auto',272 width: 'auto'273 } );274 }275 } );276 }, 100 );277 278 function enableFixedHeaders() {279 if ( $window.width() > 782 ) {280 setup();281 adjustScrollPosition();282 $window.on( 'scroll', adjustScrollPosition );283 } else {284 $window.off( 'scroll', adjustScrollPosition );285 $sections.find( '.section-header' )286 .css( {287 width: 'auto'288 } );289 $sections.find( 'h2' )290 .css( {291 position: 'static',292 top: 'auto',293 bottom: 'auto',294 width: 'auto'295 } );296 }297 }298 $( window ).resize( enableFixedHeaders );299 enableFixedHeaders();300 } );301 })( jQuery );302 </script>303 304 162 <?php 305 163
Note: See TracChangeset
for help on using the changeset viewer.