Changeset 47219 for trunk/src/wp-includes/general-template.php
- Timestamp:
- 02/09/2020 04:52:28 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/general-template.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r47210 r47219 857 857 $switched_blog = false; 858 858 859 if ( is_multisite() && ! empty( $blog_id ) && (int) $blog_id !== get_current_blog_id()) {859 if ( is_multisite() && ! empty( $blog_id ) && get_current_blog_id() !== (int) $blog_id ) { 860 860 switch_to_blog( $blog_id ); 861 861 $switched_blog = true; … … 925 925 $switched_blog = false; 926 926 927 if ( is_multisite() && ! empty( $blog_id ) && (int) $blog_id !== get_current_blog_id()) {927 if ( is_multisite() && ! empty( $blog_id ) && get_current_blog_id() !== (int) $blog_id ) { 928 928 switch_to_blog( $blog_id ); 929 929 $switched_blog = true; … … 951 951 $switched_blog = false; 952 952 953 if ( is_multisite() && ! empty( $blog_id ) && (int) $blog_id !== get_current_blog_id()) {953 if ( is_multisite() && ! empty( $blog_id ) && get_current_blog_id() !== (int) $blog_id ) { 954 954 switch_to_blog( $blog_id ); 955 955 $switched_blog = true; … … 1847 1847 1848 1848 $order = strtoupper( $parsed_args['order'] ); 1849 if ( $order !== 'ASC') {1849 if ( 'ASC' !== $order ) { 1850 1850 $order = 'DESC'; 1851 1851 } … … 2007 2007 if ( $results ) { 2008 2008 foreach ( (array) $results as $result ) { 2009 if ( $result->post_date != '0000-00-00 00:00:00') {2009 if ( '0000-00-00 00:00:00' !== $result->post_date ) { 2010 2010 $url = get_permalink( $result ); 2011 2011 if ( $result->post_title ) { … … 2015 2015 $text = $result->ID; 2016 2016 } 2017 $selected = $result->ID === get_the_ID();2017 $selected = get_the_ID() === $result->ID; 2018 2018 $output .= get_archives_link( $url, $text, $parsed_args['format'], $parsed_args['before'], $parsed_args['after'], $selected ); 2019 2019 } … … 2228 2228 $newrow = false; 2229 2229 2230 if ( $day == current_time( 'j' )&&2231 $thismonth == current_time( 'm' )&&2232 $thisyear == current_time( 'Y' )) {2230 if ( current_time( 'j' ) == $day && 2231 current_time( 'm' ) == $thismonth && 2232 current_time( 'Y' ) == $thisyear ) { 2233 2233 $calendar_output .= '<td id="today">'; 2234 2234 } else { … … 2258 2258 2259 2259 $pad = 7 - calendar_week_mod( gmdate( 'w', mktime( 0, 0, 0, $thismonth, $day, $thisyear ) ) - $week_begins ); 2260 if ( $pad != 0 && $pad != 7) {2260 if ( 0 != $pad && 7 != $pad ) { 2261 2261 $calendar_output .= "\n\t\t" . '<td class="pad" colspan="' . esc_attr( $pad ) . '"> </td>'; 2262 2262 } … … 3961 3961 $lang = get_bloginfo( 'language' ); 3962 3962 if ( $lang ) { 3963 if ( get_option( 'html_type' ) == 'text/html' || $doctype == 'html') {3963 if ( 'text/html' === get_option( 'html_type' ) || 'html' === $doctype ) { 3964 3964 $attributes[] = 'lang="' . esc_attr( $lang ) . '"'; 3965 3965 } 3966 3966 3967 if ( get_option( 'html_type' ) != 'text/html' || $doctype == 'xhtml') {3967 if ( 'text/html' !== get_option( 'html_type' ) || 'xhtml' === $doctype ) { 3968 3968 $attributes[] = 'xml:lang="' . esc_attr( $lang ) . '"'; 3969 3969 }
Note: See TracChangeset
for help on using the changeset viewer.