Skip to content

Commit

Permalink
Merge branch 'master' into latest
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickebates committed Jan 10, 2022
2 parents e69c976 + 18f1e9b commit 7947ab2
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Project Nami
===============

### Version: `2.8.2` ###
### Version: `2.8.3` ###

### Description: ###
[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://deploy.azure.com/?repository=https://github.com/ProjectNami/projectnami/tree/latest)
Expand Down
20 changes: 20 additions & 0 deletions wp-admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,26 @@
<div class="about__section changelog">
<div class="column">
<h2><?php _e( 'Maintenance and Security Releases' ); ?></h2>
<p>
<?php
printf(
/* translators: %s: WordPress version number. */
__( '<strong>Version %s</strong> addressed some security issues.' ),
'5.8.3'
);
?>
<?php
printf(
/* translators: %s: HelpHub URL. */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version. */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '5.8.3' )
)
);
?>
</p>
<p>
<?php
printf(
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/class-wp-meta-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ protected function find_compatible_table_alias( $clause, $parent_query ) {
$clause_compare = strtoupper( $clause['compare'] );
$sibling_compare = strtoupper( $sibling['compare'] );
if ( in_array( $clause_compare, $compatible_compares, true ) && in_array( $sibling_compare, $compatible_compares, true ) ) {
$alias = $sibling['alias'];
$alias = preg_replace( '/\W/', '_', $sibling['alias'] );
break;
}
}
Expand Down
8 changes: 6 additions & 2 deletions wp-includes/class-wp-tax-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ protected function find_compatible_table_alias( $clause, $parent_query ) {

// The sibling must both have compatible operator to share its alias.
if ( in_array( strtoupper( $sibling['operator'] ), $compatible_operators, true ) ) {
$alias = $sibling['alias'];
$alias = preg_replace( '/\W/', '_', $sibling['alias'] );
break;
}
}
Expand Down Expand Up @@ -556,7 +556,11 @@ private function clean_query( &$query ) {
return;
}

$query['terms'] = array_unique( (array) $query['terms'] );
if ( 'slug' === $query['field'] || 'name' === $query['field'] ) {
$query['terms'] = array_unique( (array) $query['terms'] );
} else {
$query['terms'] = wp_parse_id_list( $query['terms'] );
}

if ( is_taxonomy_hierarchical( $query['taxonomy'] ) && $query['include_children'] ) {
$this->transform_query( $query, 'term_id' );
Expand Down
17 changes: 11 additions & 6 deletions wp-includes/formatting.php
Original file line number Diff line number Diff line change
Expand Up @@ -1138,12 +1138,14 @@ function wp_check_invalid_utf8( $string, $strip = false ) {
* Encode the Unicode values to be used in the URI.
*
* @since 1.5.0
* @since 5.8.3 Added the `encode_ascii_characters` parameter.
*
* @param string $utf8_string
* @param int $length Max length of the string
* @param string $utf8_string String to encode.
* @param int $length Max length of the string
* @param bool $encode_ascii_characters Whether to encode ascii characters such as < " '
* @return string String with Unicode encoded for URI.
*/
function utf8_uri_encode( $utf8_string, $length = 0 ) {
function utf8_uri_encode( $utf8_string, $length = 0, $encode_ascii_characters = false ) {
$unicode = '';
$values = array();
$num_octets = 1;
Expand All @@ -1158,11 +1160,14 @@ function utf8_uri_encode( $utf8_string, $length = 0 ) {
$value = ord( $utf8_string[ $i ] );

if ( $value < 128 ) {
if ( $length && ( $unicode_length >= $length ) ) {
$char = chr( $value );
$encoded_char = $encode_ascii_characters ? rawurlencode( $char ) : $char;
$encoded_char_length = strlen( $encoded_char );
if ( $length && ( $unicode_length + $encoded_char_length ) > $length ) {
break;
}
$unicode .= chr( $value );
$unicode_length++;
$unicode .= $encoded_char;
$unicode_length += $encoded_char_length;
} else {
if ( count( $values ) == 0 ) {
if ( $value < 224 ) {
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/pn-version.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

$pn_version = '2.8.2';
$pn_version = '2.8.3';
2 changes: 1 addition & 1 deletion wp-includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -4930,7 +4930,7 @@ function _truncate_post_slug( $slug, $length = 200 ) {
if ( $decoded_slug === $slug ) {
$slug = substr( $slug, 0, $length );
} else {
$slug = utf8_uri_encode( $decoded_slug, $length );
$slug = utf8_uri_encode( $decoded_slug, $length, true );
}
}

Expand Down
2 changes: 1 addition & 1 deletion wp-includes/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ function count_users( $strategy = 'time', $site_id = null ) {
// Build a CPU-intensive query that will return concise information.
$select_count = array();
foreach ( $avail_roles as $this_role => $name ) {
$select_count[] = "(SELECT COUNT(*) as qty FROM $wpdb->usermeta WHERE [meta_key] = '{$blog_prefix}capabilities' AND [meta_value] LIKE '%" . $wpdb->esc_like( $this_role ) . "%') as $this_role";
$select_count[] = "(SELECT COUNT(*) as qty FROM $wpdb->usermeta WHERE [meta_key] = '{$blog_prefix}capabilities' AND [meta_value] LIKE '%" . $wpdb->esc_like( $this_role ) . "%') as [$this_role]";
}
$select_count[] = "(SELECT COUNT(*) as qty FROM $wpdb->usermeta WHERE [meta_key] = '{$blog_prefix}capabilities' AND [meta_value] = 'a:0:{}') as none";
$select_count = implode(', ', $select_count);
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8.2';
$wp_version = '5.8.3';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit 7947ab2

Please sign in to comment.