Changeset 52468 for branches/5.5
- Timestamp:
- 01/06/2022 06:09:14 PM (3 years ago)
- Location:
- branches/5.5
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.5
- Property svn:mergeinfo changed
/trunk merged: 52454-52457
- Property svn:mergeinfo changed
-
branches/5.5/src/wp-admin/includes/upgrade.php
r48869 r52468 1621 1621 while ( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) { 1622 1622 foreach ( $rows as $row ) { 1623 $value = $row->option_value;1624 if ( ! @unserialize( $value )) {1623 $value = maybe_unserialize( $row->option_value ); 1624 if ( $value === $row->option_value ) { 1625 1625 $value = stripslashes( $value ); 1626 1626 } -
branches/5.5/src/wp-includes/class-wp-meta-query.php
r48475 r52468 813 813 $sibling_compare = strtoupper( $sibling['compare'] ); 814 814 if ( in_array( $clause_compare, $compatible_compares, true ) && in_array( $sibling_compare, $compatible_compares, true ) ) { 815 $alias = $sibling['alias'];815 $alias = preg_replace( '/\W/', '_', $sibling['alias'] ); 816 816 break; 817 817 } -
branches/5.5/src/wp-includes/class-wp-tax-query.php
r48475 r52468 528 528 // The sibling must both have compatible operator to share its alias. 529 529 if ( in_array( strtoupper( $sibling['operator'] ), $compatible_operators, true ) ) { 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.5/src/wp-includes/formatting.php
r48819 r52468 1139 1139 * 1140 1140 * @since 1.5.0 1141 * 1142 * @param string $utf8_string 1143 * @param int $length Max length of the string 1141 * @since 5.8.3 Added the `encode_ascii_characters` parameter. 1142 * 1143 * @param string $utf8_string String to encode. 1144 * @param int $length Max length of the string 1145 * @param bool $encode_ascii_characters Whether to encode ascii characters such as < " ' 1144 1146 * @return string String with Unicode encoded for URI. 1145 1147 */ 1146 function utf8_uri_encode( $utf8_string, $length = 0 ) {1148 function utf8_uri_encode( $utf8_string, $length = 0, $encode_ascii_characters = false ) { 1147 1149 $unicode = ''; 1148 1150 $values = array(); … … 1159 1161 1160 1162 if ( $value < 128 ) { 1161 if ( $length && ( $unicode_length >= $length ) ) { 1163 $char = chr( $value ); 1164 $encoded_char = $encode_ascii_characters ? rawurlencode( $char ) : $char; 1165 $encoded_char_length = strlen( $encoded_char ); 1166 if ( $length && ( $unicode_length + $encoded_char_length ) > $length ) { 1162 1167 break; 1163 1168 } 1164 $unicode .= chr( $value );1165 $unicode_length ++;1169 $unicode .= $encoded_char; 1170 $unicode_length += $encoded_char_length; 1166 1171 } else { 1167 1172 if ( count( $values ) == 0 ) { -
branches/5.5/src/wp-includes/post.php
r49332 r52468 4640 4640 $slug = substr( $slug, 0, $length ); 4641 4641 } else { 4642 $slug = utf8_uri_encode( $decoded_slug, $length );4642 $slug = utf8_uri_encode( $decoded_slug, $length, true ); 4643 4643 } 4644 4644 }
Note: See TracChangeset
for help on using the changeset viewer.