Update to latest WordPress trunk.

parent 720e860b
This diff is collapsed.
......@@ -337,7 +337,6 @@
}
#adminmenu div.wp-menu-name {
display: flex;
padding: 8px 0;
}
......@@ -509,11 +508,14 @@ ul#adminmenu > li.current > a.current:after {
}
/* @todo: consider to use a single rule for these counters and the list table comments counters. */
#adminmenu .wp-menu-name > span {
#adminmenu .awaiting-mod,
#adminmenu .update-plugins {
display: inline-block;
vertical-align: top;
margin: 1px 2px -1px 1px;
padding: 0 6px;
box-sizing: border-box;
margin: 1px 2px -1px 0;
padding: 0 5px;
min-width: 18px;
height: 18px;
border-radius: 9px;
background-color: #ca4a1f;
......@@ -690,7 +692,7 @@ li#wp-admin-bar-menu-toggle {
}
.auto-fold #adminmenu a.menu-top {
height: auto;
height: 34px;
}
.auto-fold #adminmenu li.wp-menu-open {
......
This diff is collapsed.
......@@ -337,7 +337,6 @@
}
#adminmenu div.wp-menu-name {
display: flex;
padding: 8px 0;
}
......@@ -509,11 +508,14 @@ ul#adminmenu > li.current > a.current:after {
}
/* @todo: consider to use a single rule for these counters and the list table comments counters. */
#adminmenu .wp-menu-name > span {
#adminmenu .awaiting-mod,
#adminmenu .update-plugins {
display: inline-block;
vertical-align: top;
margin: 1px 1px -1px 2px;
padding: 0 6px;
box-sizing: border-box;
margin: 1px 0 -1px 2px;
padding: 0 5px;
min-width: 18px;
height: 18px;
border-radius: 9px;
background-color: #ca4a1f;
......@@ -690,7 +692,7 @@ li#wp-admin-bar-menu-toggle {
}
.auto-fold #adminmenu a.menu-top {
height: auto;
height: 34px;
}
.auto-fold #adminmenu li.wp-menu-open {
......
This diff is collapsed.
......@@ -1004,7 +1004,7 @@ function update_core( $from, $to ) {
// Add a warning when the JSON PHP extension is missing.
if ( ! extension_loaded( 'json' ) ) {
return new WP_Error(
'php_not_compatible',
'php_not_compatible_json',
sprintf(
/* translators: 1: WordPress version number, 2: The PHP extension name needed. */
__( 'The update cannot be installed because WordPress %1$s requires the %2$s PHP extension.' ),
......
......@@ -7180,3 +7180,45 @@ function wp_get_original_image_path( $attachment_id ) {
*/
return apply_filters( 'wp_get_original_image_path', $original_image, $attachment_id );
}
/**
* Retrieve the URL to an original attachment image.
*
* Similar to `wp_get_attachment_url()` however some images may have been
* processed after uploading. In this case this function returns the URL
* to the originally uploaded image file.
*
* @since 5.3.0
*
* @param int $attachment_id Attachment post ID.
* @return string|false Attachment image URL, false on error or if the attachment is not an image.
*/
function wp_get_original_image_url( $attachment_id ) {
if ( ! wp_attachment_is_image( $attachment_id ) ) {
return false;
}
$image_url = wp_get_attachment_url( $attachment_id );
if ( empty( $image_url ) ) {
return false;
}
$image_meta = wp_get_attachment_metadata( $attachment_id );
if ( empty( $image_meta['original_image'] ) ) {
$original_image_url = $image_url;
} else {
$original_image_url = path_join( dirname( $image_url ), $image_meta['original_image'] );
}
/**
* Filters the URL to the original attachment image.
*
* @since 5.3.0
*
* @param string $original_image_url URL to original image.
* @param int $attachment_id Attachment ID.
*/
return apply_filters( 'wp_get_original_image_url', $original_image_url, $attachment_id );
}
......@@ -1491,7 +1491,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'user-suggest', "/wp-admin/js/user-suggest$suffix.js", array( 'jquery-ui-autocomplete' ), false, 1 );
$scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array( 'jquery' ), false, 1 );
$scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1 );
$scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 );
did_action( 'init' ) && $scripts->localize(
......
......@@ -488,9 +488,8 @@ function get_shortcode_atts_regex() {
* retrieval of the attributes, since all attributes have to be known.
*
* @since 2.5.0
* @since 5.3.0 Added support of a full shortcode input.
*
* @param string $text Any single shortcode of any format or key/value pair string.
* @param string $text
* @return array|string List of attribute values.
* Returns empty array if trim( $text ) == '""'.
* Returns empty string if trim( $text ) == ''.
......@@ -499,13 +498,7 @@ function get_shortcode_atts_regex() {
function shortcode_parse_atts( $text ) {
$atts = array();
$pattern = get_shortcode_atts_regex();
$text = trim( preg_replace( "/[\x{00a0}\x{200b}]+/u", ' ', $text ) );
// Remove everything but attributes from shortcode.
if ( preg_match( '#^\[[\w-]+([^\]]*?)\/?\]#', $text, $matches ) ) {
$text = $matches[1];
}
$text = preg_replace( "/[\x{00a0}\x{200b}]+/u", ' ', $text );
if ( preg_match_all( $pattern, $text, $match, PREG_SET_ORDER ) ) {
foreach ( $match as $m ) {
if ( ! empty( $m[1] ) ) {
......
......@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-beta3-46549';
$wp_version = '5.3-RC1-46561';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment