Changeset 3631 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/header.php
- Timestamp:
- 07/07/2016 06:04:37 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/header.php
r3630 r3631 27 27 $hash = isset( $_COOKIE[ $cookie ] ) ? $_COOKIE[ $cookie ] : ''; 28 28 29 if ( $welcome && md5( $welcome->post_content ) !== $hash ) { 29 $content_hash = $welcome ? md5( $welcome->post_content ) : ''; 30 31 if ( $welcome && ( empty( $hash ) || $content_hash !== $hash ) ) { 32 $columns = preg_split( '|<hr\s*/?>|', $welcome->post_content ); 33 if ( count( $columns ) === 2 ) { 34 $welcome->post_content = "<div class='first-column'>\n\n{$columns[0]}</div><div class='second-column'>\n\n{$columns[1]}</div>"; 35 } 30 36 setup_postdata( $welcome ); 31 37 ?> 32 38 <div class="make-welcome-wrapper"> 33 <span id="make-welcome-hide" class="dashicons dashicons-no" data-hash="<?php echo md5( $welcome->post_content ); ?>" data-cookie="<?php echo $cookie; ?>" title="<?php _e( 'Hide this message', 'p2-breathe' ); ?>"></span>39 <span id="make-welcome-hide" class="dashicons dashicons-no" data-hash="<?php echo $content_hash; ?>" data-cookie="<?php echo $cookie; ?>" title="<?php _e( 'Hide this message', 'p2-breathe' ); ?>"></span> 34 40 <div class="make-welcome"> 35 41 <?php
Note: See TracChangeset
for help on using the changeset viewer.