Changeset 52473
- Timestamp:
- 01/06/2022 06:13:41 PM (3 years ago)
- Location:
- branches/5.0
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0
- Property svn:mergeinfo changed
/trunk merged: 52454-52457
- Property svn:mergeinfo changed
-
branches/5.0/src/wp-admin/includes/upgrade.php
r43954 r52473 1326 1326 while( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) { 1327 1327 foreach ( $rows as $row ) { 1328 $value = $row->option_value;1329 if ( !@unserialize( $value ))1328 $value = maybe_unserialize( $row->option_value ); 1329 if ( $value === $row->option_value ) 1330 1330 $value = stripslashes( $value ); 1331 1331 if ( $value !== $row->option_value ) { -
branches/5.0/src/wp-includes/class-wp-meta-query.php
r41688 r52473 696 696 $sibling_compare = strtoupper( $sibling['compare'] ); 697 697 if ( in_array( $clause_compare, $compatible_compares ) && in_array( $sibling_compare, $compatible_compares ) ) { 698 $alias = $sibling['alias'];698 $alias = preg_replace( '/\W/', '_', $sibling['alias'] ); 699 699 break; 700 700 } -
branches/5.0/src/wp-includes/class-wp-tax-query.php
r41688 r52473 528 528 // The sibling must both have compatible operator to share its alias. 529 529 if ( in_array( strtoupper( $sibling['operator'] ), $compatible_operators ) ) { 530 $alias = $sibling['alias'];530 $alias = preg_replace( '/\W/', '_', $sibling['alias'] ); 531 531 break; 532 532 } … … 557 557 } 558 558 559 $query['terms'] = array_unique( (array) $query['terms'] ); 559 if ( 'slug' === $query['field'] || 'name' === $query['field'] ) { 560 $query['terms'] = array_unique( (array) $query['terms'] ); 561 } else { 562 $query['terms'] = wp_parse_id_list( $query['terms'] ); 563 } 560 564 561 565 if ( is_taxonomy_hierarchical( $query['taxonomy'] ) && $query['include_children'] ) { -
branches/5.0/src/wp-includes/formatting.php
r49396 r52473 1085 1085 * 1086 1086 * @since 1.5.0 1087 * 1088 * @param string $utf8_string 1089 * @param int $length Max length of the string 1087 * @since 5.8.3 Added the `encode_ascii_characters` parameter. 1088 * 1089 * @param string $utf8_string String to encode. 1090 * @param int $length Max length of the string 1091 * @param bool $encode_ascii_characters Whether to encode ascii characters such as < " ' 1090 1092 * @return string String with Unicode encoded for URI. 1091 1093 */ 1092 function utf8_uri_encode( $utf8_string, $length = 0 ) {1094 function utf8_uri_encode( $utf8_string, $length = 0, $encode_ascii_characters = false ) { 1093 1095 $unicode = ''; 1094 1096 $values = array(); … … 1105 1107 1106 1108 if ( $value < 128 ) { 1107 if ( $length && ( $unicode_length >= $length ) ) { 1109 $char = chr( $value ); 1110 $encoded_char = $encode_ascii_characters ? rawurlencode( $char ) : $char; 1111 $encoded_char_length = strlen( $encoded_char ); 1112 if ( $length && ( $unicode_length + $encoded_char_length ) > $length ) { 1108 1113 break; 1109 1114 } 1110 $unicode .= chr( $value );1111 $unicode_length ++;1115 $unicode .= $encoded_char; 1116 $unicode_length += $encoded_char_length; 1112 1117 } else { 1113 1118 if ( count( $values ) == 0 ) { -
branches/5.0/src/wp-includes/post.php
r47647 r52473 4060 4060 $slug = substr( $slug, 0, $length ); 4061 4061 else 4062 $slug = utf8_uri_encode( $decoded_slug, $length );4062 $slug = utf8_uri_encode( $decoded_slug, $length, true ); 4063 4063 } 4064 4064
Note: See TracChangeset
for help on using the changeset viewer.