Changeset 3315
- Timestamp:
- 06/07/2016 06:55:39 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
r3314 r3315 319 319 * 320 320 * @param boolean $ignore_minor Use the major release version X.Y.0 instead of the actual version X.Y.Z? 321 * @return object 321 * @return object|WP_Error 322 322 */ 323 323 function get_current_version_term( $ignore_minor = true ) { … … 345 345 ) ); 346 346 347 return $version[0];347 return is_wp_error( $version ) ? $version : reset( $version ); 348 348 } 349 349 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/page-reference-landing.php
r1504 r3315 36 36 <div class="new-in-guide section two-columns clear"> 37 37 <div class="widget box gray"> 38 <h3 class="widget-title"><?php $version = DevHub\get_current_version_term(); printf( __( 'New & Updated in WordPress %s:', 'wporg' ), substr( $version->name, 0, -2 ) ); ?></h3> 38 <?php $version = DevHub\get_current_version_term(); ?> 39 <?php if ( $version && ! is_wp_error( $version ) ) : ?> 40 <h3 class="widget-title"><?php printf( __( 'New & Updated in WordPress %s:', 'wporg' ), substr( $version->name, 0, -2 ) ); ?></h3> 39 41 <div class="widget-content"> 40 42 <ul class="unordered-list no-bullets"> … … 62 64 </ul> 63 65 </div> 66 <?php endif; ?> 64 67 </div> 65 68 <div class="widget box gray">
Note: See TracChangeset
for help on using the changeset viewer.