Changeset 52480 for branches/4.3
- Timestamp:
- 01/06/2022 06:19:09 PM (3 years ago)
- Location:
- branches/4.3
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.3
- Property svn:mergeinfo changed
/trunk merged: 52454-52457
- Property svn:mergeinfo changed
-
branches/4.3/src/wp-admin/includes/upgrade.php
r37938 r52480 1207 1207 while( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) { 1208 1208 foreach( $rows as $row ) { 1209 $value = $row->option_value;1210 if ( !@unserialize( $value ))1209 $value = maybe_unserialize( $row->option_value ); 1210 if ( $value === $row->option_value ) 1211 1211 $value = stripslashes( $value ); 1212 1212 if ( $value !== $row->option_value ) { -
branches/4.3/src/wp-includes/formatting.php
r49403 r52480 999 999 * 1000 1000 * @since 1.5.0 1001 * 1002 * @param string $utf8_string 1003 * @param int $length Max length of the string 1001 * @since 5.8.3 Added the `encode_ascii_characters` parameter. 1002 * 1003 * @param string $utf8_string String to encode. 1004 * @param int $length Max length of the string 1005 * @param bool $encode_ascii_characters Whether to encode ascii characters such as < " ' 1004 1006 * @return string String with Unicode encoded for URI. 1005 1007 */ 1006 function utf8_uri_encode( $utf8_string, $length = 0 ) {1008 function utf8_uri_encode( $utf8_string, $length = 0, $encode_ascii_characters = false ) { 1007 1009 $unicode = ''; 1008 1010 $values = array(); … … 1019 1021 1020 1022 if ( $value < 128 ) { 1021 if ( $length && ( $unicode_length >= $length ) ) { 1023 $char = chr( $value ); 1024 $encoded_char = $encode_ascii_characters ? rawurlencode( $char ) : $char; 1025 $encoded_char_length = strlen( $encoded_char ); 1026 if ( $length && ( $unicode_length + $encoded_char_length ) > $length ) { 1022 1027 break; 1023 1028 } 1024 $unicode .= chr( $value );1025 $unicode_length ++;1029 $unicode .= $encoded_char; 1030 $unicode_length += $encoded_char_length; 1026 1031 } else { 1027 1032 if ( count( $values ) == 0 ) { -
branches/4.3/src/wp-includes/meta.php
r49403 r52480 1572 1572 $sibling_compare = strtoupper( $sibling['compare'] ); 1573 1573 if ( in_array( $clause_compare, $compatible_compares ) && in_array( $sibling_compare, $compatible_compares ) ) { 1574 $alias = $sibling['alias'];1574 $alias = preg_replace( '/\W/', '_', $sibling['alias'] ); 1575 1575 break; 1576 1576 } -
branches/4.3/src/wp-includes/post.php
r43399 r52480 3895 3895 $slug = substr( $slug, 0, $length ); 3896 3896 else 3897 $slug = utf8_uri_encode( $decoded_slug, $length );3897 $slug = utf8_uri_encode( $decoded_slug, $length, true ); 3898 3898 } 3899 3899 -
branches/4.3/src/wp-includes/taxonomy.php
r37136 r52480 1187 1187 // The sibling must both have compatible operator to share its alias. 1188 1188 if ( in_array( strtoupper( $sibling['operator'] ), $compatible_operators ) ) { 1189 $alias = $sibling['alias'];1189 $alias = preg_replace( '/\W/', '_', $sibling['alias'] ); 1190 1190 break; 1191 1191 } … … 1217 1217 } 1218 1218 1219 $query['terms'] = array_unique( (array) $query['terms'] ); 1219 if ( 'slug' === $query['field'] || 'name' === $query['field'] ) { 1220 $query['terms'] = array_unique( (array) $query['terms'] ); 1221 } else { 1222 $query['terms'] = wp_parse_id_list( $query['terms'] ); 1223 } 1220 1224 1221 1225 if ( is_taxonomy_hierarchical( $query['taxonomy'] ) && $query['include_children'] ) {
Note: See TracChangeset
for help on using the changeset viewer.