Ticket #54728: 54728.2.diff
File 54728.2.diff, 3.3 KB (added by , 3 years ago) |
---|
-
src/wp-admin/includes/misc.php
597 597 continue; 598 598 } 599 599 600 if ( T_STRING == $tokens[ $t ][0] && ( '(' === $tokens[ $t + 1 ] || '(' === $tokens[ $t + 2 ] ) ) {600 if ( T_STRING === $tokens[ $t ][0] && ( '(' === $tokens[ $t + 1 ] || '(' === $tokens[ $t + 2 ] ) ) { 601 601 // If it's a function or class defined locally, there's not going to be any docs available. 602 602 if ( ( isset( $tokens[ $t - 2 ][1] ) && in_array( $tokens[ $t - 2 ][1], array( 'function', 'class' ), true ) ) 603 || ( isset( $tokens[ $t - 2 ][0] ) && T_OBJECT_OPERATOR == $tokens[ $t - 1 ][0] )603 || ( isset( $tokens[ $t - 2 ][0] ) && T_OBJECT_OPERATOR === $tokens[ $t - 1 ][0] ) 604 604 ) { 605 605 $ignore_functions[] = $tokens[ $t ][1]; 606 606 } … … 651 651 $option = $_POST['wp_screen_options']['option']; 652 652 $value = $_POST['wp_screen_options']['value']; 653 653 654 if ( sanitize_key( $option ) != $option ) {654 if ( sanitize_key( $option ) !== $option ) { 655 655 return; 656 656 } 657 657 … … 771 771 } 772 772 $xpath = new DOMXPath( $doc ); 773 773 $rules = $xpath->query( '/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]' ); 774 if ( 0 == $rules->length ) {774 if ( 0 === $rules->length ) { 775 775 return false; 776 776 } else { 777 777 return true; … … 867 867 868 868 $xmlnodes = $xpath->query( '/configuration/system.webServer' ); 869 869 if ( $xmlnodes->length > 0 ) { 870 $system_web Server_node = $xmlnodes->item( 0 );871 $system_web Server_node->appendChild( $rewrite_node );870 $system_web_server_node = $xmlnodes->item( 0 ); 871 $system_web_server_node->appendChild( $rewrite_node ); 872 872 } else { 873 $system_web Server_node = $doc->createElement( 'system.webServer' );874 $system_web Server_node->appendChild( $rewrite_node );873 $system_web_server_node = $doc->createElement( 'system.webServer' ); 874 $system_web_server_node->appendChild( $rewrite_node ); 875 875 876 876 $xmlnodes = $xpath->query( '/configuration' ); 877 877 if ( $xmlnodes->length > 0 ) { 878 878 $config_node = $xmlnodes->item( 0 ); 879 $config_node->appendChild( $system_web Server_node );879 $config_node->appendChild( $system_web_server_node ); 880 880 } else { 881 881 $config_node = $doc->createElement( 'configuration' ); 882 882 $doc->appendChild( $config_node ); 883 $config_node->appendChild( $system_web Server_node );883 $config_node->appendChild( $system_web_server_node ); 884 884 } 885 885 } 886 886 } … … 955 955 foreach ( $_wp_admin_css_colors as $color => $color_info ) : 956 956 957 957 ?> 958 <div class="color-option <?php echo ( $color == $current_color ) ? 'selected' : ''; ?>">958 <div class="color-option <?php echo ( $color === $current_color ) ? 'selected' : ''; ?>"> 959 959 <input name="admin_color" id="admin_color_<?php echo esc_attr( $color ); ?>" type="radio" value="<?php echo esc_attr( $color ); ?>" class="tog" <?php checked( $color, $current_color ); ?> /> 960 960 <input type="hidden" class="css_url" value="<?php echo esc_url( $color_info->url ); ?>" /> 961 961 <input type="hidden" class="icon_colors" value="<?php echo esc_attr( wp_json_encode( array( 'icons' => $color_info->icon_colors ) ) ); ?>" />