<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[56191] trunk/src/wp-includes: Docs: Replace multiple single line comments with multi-line comments.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/56191">56191</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/56191","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>audrasjb</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2023-07-10 22:36:06 +0000 (Mon, 10 Jul 2023)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Docs: Replace multiple single line comments with multi-line comments.
This changeset updates various comments as per WordPress PHP Inline Documentation Standards.
See https://developer.wordpress.org/coding-standards/inline-documentation-standards/php/<a href="https://core.trac.wordpress.org/ticket/5">#5</a>-inline-comments.
Follow-up to <a href="https://core.trac.wordpress.org/changeset/56174">[56174]</a>, <a href="https://core.trac.wordpress.org/changeset/56175">[56175]</a>, <a href="https://core.trac.wordpress.org/changeset/56176">[56176]</a>, <a href="https://core.trac.wordpress.org/changeset/56177">[56177]</a>, <a href="https://core.trac.wordpress.org/changeset/56178">[56178]</a>, <a href="https://core.trac.wordpress.org/changeset/56179">[56179]</a>, <a href="https://core.trac.wordpress.org/changeset/56180">[56180]</a>.
Props costdev, audrasjb.
See <a href="https://core.trac.wordpress.org/ticket/58459">#58459</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesformattingphp">trunk/src/wp-includes/formatting.php</a></li>
<li><a href="#trunksrcwpincludesfunctionsphp">trunk/src/wp-includes/functions.php</a></li>
<li><a href="#trunksrcwpincludeshttpsdetectionphp">trunk/src/wp-includes/https-detection.php</a></li>
<li><a href="#trunksrcwpincludeshttpsmigrationphp">trunk/src/wp-includes/https-migration.php</a></li>
<li><a href="#trunksrcwpincludesksesphp">trunk/src/wp-includes/kses.php</a></li>
<li><a href="#trunksrcwpincludeslinktemplatephp">trunk/src/wp-includes/link-template.php</a></li>
<li><a href="#trunksrcwpincludesmediaphp">trunk/src/wp-includes/media.php</a></li>
<li><a href="#trunksrcwpincludesmetaphp">trunk/src/wp-includes/meta.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesformattingphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/formatting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/formatting.php 2023-07-10 22:18:27 UTC (rev 56190)
+++ trunk/src/wp-includes/formatting.php 2023-07-10 22:36:06 UTC (rev 56191)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -136,8 +136,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $static_characters = array_merge( array( '...', '``', '\'\'', ' (tm)' ), $cockney );
</span><span class="cx" style="display: block; padding: 0 10px"> $static_replacements = array_merge( array( '…', $opening_quote, $closing_quote, ' ™' ), $cockneyreplace );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Pattern-based replacements of characters.
- // Sort the remaining patterns into several arrays for performance tuning.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Pattern-based replacements of characters.
+ * Sort the remaining patterns into several arrays for performance tuning.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $dynamic_characters = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'apos' => array(),
</span><span class="cx" style="display: block; padding: 0 10px"> 'quote' => array(),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -340,8 +342,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Assume the rightmost quote-period match is the end of quotation.
</span><span class="cx" style="display: block; padding: 0 10px"> $pos = strrpos( $sentence, "$flag." );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // When all else fails, make the rightmost candidate a closing quote.
- // This is most likely to be problematic in the context of bug #18549.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * When all else fails, make the rightmost candidate a closing quote.
+ * This is most likely to be problematic in the context of bug #18549.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $pos = strrpos( $sentence, $flag );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $sentence = substr_replace( $sentence, $close_quote, $pos, strlen( $flag ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -976,8 +980,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $double_encode ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Guarantee every &entity; is valid, convert &garbage; into &garbage;
- // This is required for PHP < 5.4.0 because ENT_HTML401 flag is unavailable.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Guarantee every &entity; is valid, convert &garbage; into &garbage;
+ * This is required for PHP < 5.4.0 because ENT_HTML401 flag is unavailable.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $text = wp_kses_normalize_entities( $text, ( $quote_style & ENT_XML1 ) ? 'xml' : 'html' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1601,8 +1607,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( seems_utf8( $text ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Unicode sequence normalization from NFD (Normalization Form Decomposed)
- // to NFC (Normalization Form [Pre]Composed), the encoding used in this function.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Unicode sequence normalization from NFD (Normalization Form Decomposed)
+ * to NFC (Normalization Form [Pre]Composed), the encoding used in this function.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( function_exists( 'normalizer_is_normalized' )
</span><span class="cx" style="display: block; padding: 0 10px"> && function_exists( 'normalizer_normalize' )
</span><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1817,8 +1825,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> '€' => 'E',
</span><span class="cx" style="display: block; padding: 0 10px"> // GBP (Pound) sign.
</span><span class="cx" style="display: block; padding: 0 10px"> '£' => '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Vowels with diacritic (Vietnamese).
- // Unmarked.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Vowels with diacritic (Vietnamese). Unmarked.
</ins><span class="cx" style="display: block; padding: 0 10px"> 'Ơ' => 'O',
</span><span class="cx" style="display: block; padding: 0 10px"> 'ơ' => 'o',
</span><span class="cx" style="display: block; padding: 0 10px"> 'Ư' => 'U',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2661,17 +2668,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $tag = '';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } else { // Begin tag.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $has_self_closer ) { // If it presents itself as a self-closing tag...
- // ...but it isn't a known single-entity self-closing tag, then don't let it be treated as such
- // and immediately close it with a closing tag (the tag will encapsulate no text as a result).
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $has_self_closer ) {
+ /*
+ * If it presents itself as a self-closing tag, but it isn't a known single-entity self-closing tag,
+ * then don't let it be treated as such and immediately close it with a closing tag.
+ * The tag will encapsulate no text as a result.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! $is_single_tag ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $attributes = trim( substr( $attributes, 0, -1 ) ) . "></$tag";
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( $is_single_tag ) { // Else if it's a known single-entity tag but it doesn't close itself, do so.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( $is_single_tag ) {
+ // Else if it's a known single-entity tag but it doesn't close itself, do so.
</ins><span class="cx" style="display: block; padding: 0 10px"> $pre_attribute_ws = ' ';
</span><span class="cx" style="display: block; padding: 0 10px"> $attributes .= '/';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else { // It's not a single-entity tag.
- // If the top of the stack is the same as the tag we want to push, close previous tag.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } else {
+ /*
+ * It's not a single-entity tag.
+ * If the top of the stack is the same as the tag we want to push, close previous tag.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $stacksize > 0 && ! in_array( $tag, $nestable_tags, true ) && $tagstack[ $stacksize - 1 ] === $tag ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $tagqueue = '</' . array_pop( $tagstack ) . '>';
</span><span class="cx" style="display: block; padding: 0 10px"> $stacksize--;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2925,8 +2939,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $url = $matches[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ')' === $matches[3] && strpos( $url, '(' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // If the trailing character is a closing parethesis, and the URL has an opening parenthesis in it,
- // add the closing parenthesis to the URL. Then we can let the parenthesis balancer do its thing below.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * If the trailing character is a closing parethesis, and the URL has an opening parenthesis in it,
+ * add the closing parenthesis to the URL. Then we can let the parenthesis balancer do its thing below.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $url .= $matches[3];
</span><span class="cx" style="display: block; padding: 0 10px"> $suffix = '';
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3106,8 +3122,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> (\)?) # 3: Trailing closing parenthesis (for parethesis balancing post processing).
</span><span class="cx" style="display: block; padding: 0 10px"> ~xS';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // The regex is a non-anchored pattern and does not have a single fixed starting character.
- // Tell PCRE to spend more time optimizing since, when used on a page load, it will probably be used several times.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * The regex is a non-anchored pattern and does not have a single fixed starting character.
+ * Tell PCRE to spend more time optimizing since, when used on a page load, it will probably be used several times.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $ret = preg_replace_callback( $url_clickable, '_make_url_clickable_cb', $ret );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3556,15 +3574,19 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Split out the local and domain parts.
</span><span class="cx" style="display: block; padding: 0 10px"> list( $local, $domain ) = explode( '@', $email, 2 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // LOCAL PART
- // Test for invalid characters.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * LOCAL PART
+ * Test for invalid characters.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! preg_match( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', $local ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/formatting.php */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'is_email', false, $email, 'local_invalid_chars' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // DOMAIN PART
- // Test for sequences of periods.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * DOMAIN PART
+ * Test for sequences of periods.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( preg_match( '/\.{2,}/', $domain ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/formatting.php */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'is_email', false, $email, 'domain_period_sequence' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3766,8 +3788,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Split out the local and domain parts.
</span><span class="cx" style="display: block; padding: 0 10px"> list( $local, $domain ) = explode( '@', $email, 2 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // LOCAL PART
- // Test for invalid characters.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * LOCAL PART
+ * Test for invalid characters.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $local = preg_replace( '/[^a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]/', '', $local );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( '' === $local ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/formatting.php */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3774,8 +3798,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'sanitize_email', '', $email, 'local_invalid_chars' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // DOMAIN PART
- // Test for sequences of periods.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * DOMAIN PART
+ * Test for sequences of periods.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $domain = preg_replace( '/\.{2,}/', '', $domain );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( '' === $domain ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/formatting.php */
</span></span></pre></div>
<a id="trunksrcwpincludesfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/functions.php 2023-07-10 22:18:27 UTC (rev 56190)
+++ trunk/src/wp-includes/functions.php 2023-07-10 22:36:06 UTC (rev 56191)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3797,8 +3797,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $text_direction = $parsed_args['text_direction'];
</span><span class="cx" style="display: block; padding: 0 10px"> $dir_attr = "dir='$text_direction'";
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // If `text_direction` was not explicitly passed,
- // use get_language_attributes() if available.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * If `text_direction` was not explicitly passed,
+ * use get_language_attributes() if available.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $args['text_direction'] )
</span><span class="cx" style="display: block; padding: 0 10px"> && function_exists( 'language_attributes' ) && function_exists( 'is_rtl' )
</span><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5085,9 +5087,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string kebab-cased-string.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function _wp_to_kebab_case( $input_string ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- //phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
- // ignore the camelCase names for variables so the names are the same as lodash
- // so comparing and porting new changes is easier.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Ignore the camelCase names for variables so the names are the same as lodash so comparing and porting new changes is easier.
+ // phpcs:disable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px"> * Some notable things we've removed compared to the lodash version are:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6897,8 +6898,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $evanescent_hare = $start;
</span><span class="cx" style="display: block; padding: 0 10px"> $return = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Set evanescent_hare to one past hare.
- // Increment hare two steps.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Set evanescent_hare to one past hare. Increment hare two steps.
</ins><span class="cx" style="display: block; padding: 0 10px"> while (
</span><span class="cx" style="display: block; padding: 0 10px"> $tortoise
</span><span class="cx" style="display: block; padding: 0 10px"> &&
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -8349,8 +8349,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_dirsize( $directory, $max_execution_time = null ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Exclude individual site directories from the total when checking the main site of a network,
- // as they are subdirectories and should not be counted.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Exclude individual site directories from the total when checking the main site of a network,
+ * as they are subdirectories and should not be counted.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() && is_main_site() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $size = recurse_dirsize( $directory, $directory . '/sites', $max_execution_time );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span></span></pre></div>
<a id="trunksrcwpincludeshttpsdetectionphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/https-detection.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/https-detection.php 2023-07-10 22:18:27 UTC (rev 56190)
+++ trunk/src/wp-includes/https-detection.php 2023-07-10 22:36:06 UTC (rev 56191)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -49,9 +49,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool True if using HTTPS, false otherwise.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_is_site_url_using_https() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Use direct option access for 'siteurl' and manually run the 'site_url'
- // filter because `site_url()` will adjust the scheme based on what the
- // current request is using.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Use direct option access for 'siteurl' and manually run the 'site_url'
+ * filter because `site_url()` will adjust the scheme based on what the
+ * current request is using.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> /** This filter is documented in wp-includes/link-template.php */
</span><span class="cx" style="display: block; padding: 0 10px"> $site_url = apply_filters( 'site_url', get_option( 'siteurl' ), '', null, null );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludeshttpsmigrationphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/https-migration.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/https-migration.php 2023-07-10 22:18:27 UTC (rev 56190)
+++ trunk/src/wp-includes/https-migration.php 2023-07-10 22:36:06 UTC (rev 56191)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -97,8 +97,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'siteurl', $siteurl );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! wp_is_using_https() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // If this did not result in the site recognizing HTTPS as being used,
- // revert the change and return false.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * If this did not result in the site recognizing HTTPS as being used,
+ * revert the change and return false.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> update_option( 'home', $orig_home );
</span><span class="cx" style="display: block; padding: 0 10px"> update_option( 'siteurl', $orig_siteurl );
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span></span></pre></div>
<a id="trunksrcwpincludesksesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/kses.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/kses.php 2023-07-10 22:18:27 UTC (rev 56190)
+++ trunk/src/wp-includes/kses.php 2023-07-10 22:36:06 UTC (rev 56191)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -791,8 +791,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( count( $split ) === 2 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $value = $split[1];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Remove quotes surrounding $value.
- // Also guarantee correct quoting in $attr for this one attribute.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Remove quotes surrounding $value.
+ * Also guarantee correct quoting in $attr for this one attribute.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( '' === $value ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $quote = '';
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1442,8 +1444,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } // End while.
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 1 == $mode && false === array_key_exists( $attrname, $attrarr ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Special case, for when the attribute list ends with a valueless
- // attribute like "selected".
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Special case, for when the attribute list ends with a valueless
+ * attribute like "selected".
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $attrarr[ $attrname ] = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'name' => $attrname,
</span><span class="cx" style="display: block; padding: 0 10px"> 'value' => '',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1546,8 +1550,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> . '\s*'; // Trailing space is optional except as mentioned above.
</span><span class="cx" style="display: block; padding: 0 10px"> // phpcs:enable
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Although it is possible to reduce this procedure to a single regexp,
- // we must run that regexp twice to get exactly the expected result.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Although it is possible to reduce this procedure to a single regexp,
+ * we must run that regexp twice to get exactly the expected result.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $validation = "%^($regex)+$%";
</span><span class="cx" style="display: block; padding: 0 10px"> $extraction = "%$regex%";
</span></span></pre></div>
<a id="trunksrcwpincludeslinktemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/link-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/link-template.php 2023-07-10 22:18:27 UTC (rev 56190)
+++ trunk/src/wp-includes/link-template.php 2023-07-10 22:36:06 UTC (rev 56191)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -249,8 +249,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $category = get_category_parents( $category_object->parent, false, '/', true ) . $category;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Show default category in permalinks,
- // without having to assign it explicitly.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Show default category in permalinks,
+ * without having to assign it explicitly.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $category ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $default_category = get_term( get_option( 'default_category' ), 'category' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $default_category && ! is_wp_error( $default_category ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -265,8 +267,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $author = $authordata->user_nicename;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // This is not an API call because the permalink is based on the stored post_date value,
- // which should be parsed as local time regardless of the default PHP timezone.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * This is not an API call because the permalink is based on the stored post_date value,
+ * which should be parsed as local time regardless of the default PHP timezone.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $date = explode( ' ', str_replace( array( '-', ':' ), ' ', $post->post_date ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $rewritereplace = array(
</span></span></pre></div>
<a id="trunksrcwpincludesmediaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/media.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/media.php 2023-07-10 22:18:27 UTC (rev 56190)
+++ trunk/src/wp-includes/media.php 2023-07-10 22:36:06 UTC (rev 56191)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -217,8 +217,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $is_intermediate = false;
</span><span class="cx" style="display: block; padding: 0 10px"> $img_url_basename = wp_basename( $img_url );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // If the file isn't an image, attempt to replace its URL with a rendered image from its meta.
- // Otherwise, a non-image type could be returned.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * If the file isn't an image, attempt to replace its URL with a rendered image from its meta.
+ * Otherwise, a non-image type could be returned.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! $is_image ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $meta['sizes']['full'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $img_url = str_replace( $img_url_basename, $meta['sizes']['full']['file'], $img_url );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -652,8 +654,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // The return array matches the parameters to imagecopyresampled().
- // int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * The return array matches the parameters to imagecopyresampled().
+ * int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1077,8 +1081,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $attr['decoding'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // If the default value of `lazy` for the `loading` attribute is overridden
- // to omit the attribute for this image, ensure it is not included.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * If the default value of `lazy` for the `loading` attribute is overridden
+ * to omit the attribute for this image, ensure it is not included.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $attr['loading'] ) && ! $attr['loading'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $attr['loading'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1759,9 +1765,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool Whether to add the attribute.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_lazy_loading_enabled( $tag_name, $context ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // By default add to all 'img' and 'iframe' tags.
- // See https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading
- // See https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-loading
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * By default add to all 'img' and 'iframe' tags.
+ * See https://html.spec.whatwg.org/multipage/embedded-content.html#attr-img-loading
+ * See https://html.spec.whatwg.org/multipage/iframe-embed-object.html#attr-iframe-loading
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $default = ( 'img' === $tag_name || 'iframe' === $tag_name );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1825,8 +1833,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $attachment_id = absint( $class_id[1] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $attachment_id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // If exactly the same image tag is used more than once, overwrite it.
- // All identical tags will be replaced later with 'str_replace()'.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * If exactly the same image tag is used more than once, overwrite it.
+ * All identical tags will be replaced later with 'str_replace()'.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $images[ $tag ] = $attachment_id;
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2040,8 +2050,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Converted `img` tag with `decoding` attribute added.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_img_tag_add_decoding_attr( $image, $context ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Only apply the decoding attribute to images that have a src attribute that
- // starts with a double quote, ensuring escaped JSON is also excluded.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Only apply the decoding attribute to images that have a src attribute that
+ * starts with a double quote, ensuring escaped JSON is also excluded.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! str_contains( $image, ' src="' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return $image;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2158,14 +2170,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Converted `iframe` tag with `loading` attribute added.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_iframe_tag_add_loading_attr( $iframe, $context ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Iframes with fallback content (see `wp_filter_oembed_result()`) should not be lazy-loaded because they are
- // visually hidden initially.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Iframes with fallback content (see `wp_filter_oembed_result()`) should not be lazy-loaded because they are
+ * visually hidden initially.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( str_contains( $iframe, ' data-secret="' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return $iframe;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Get loading attribute value to use. This must occur before the conditional check below so that even iframes that
- // are ineligible for being lazy-loaded are considered.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Get loading attribute value to use. This must occur before the conditional check below so that even iframes that
+ * are ineligible for being lazy-loaded are considered.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $optimization_attrs = wp_get_loading_optimization_attributes(
</span><span class="cx" style="display: block; padding: 0 10px"> 'iframe',
</span><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3522,8 +3538,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_enqueue_script( 'mediaelement-vimeo' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // MediaElement.js has issues with some URL formats for Vimeo and YouTube,
- // so update the URL to prevent the ME.js player from breaking.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * MediaElement.js has issues with some URL formats for Vimeo and YouTube,
+ * so update the URL to prevent the ME.js player from breaking.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'mediaelement' === $library ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $is_youtube ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Remove `feature` query arg and force SSL - see #40866.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3990,8 +4008,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $args['mime_type'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $file_info = wp_check_filetype( $args['path'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // If $file_info['type'] is false, then we let the editor attempt to
- // figure out the file type, rather than forcing a failure based on extension.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * If $file_info['type'] is false, then we let the editor attempt to
+ * figure out the file type, rather than forcing a failure based on extension.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $file_info ) && $file_info['type'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $args['mime_type'] = $file_info['type'];
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4088,8 +4108,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $args['mime_type'] !== $args['output_mime_type'] &&
</span><span class="cx" style="display: block; padding: 0 10px"> ! call_user_func( array( $implementation, 'supports_mime_type' ), $args['output_mime_type'] )
</span><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // This implementation supports the imput type but not the output type.
- // Keep looking to see if we can find an implementation that supports both.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * This implementation supports the imput type but not the output type.
+ * Keep looking to see if we can find an implementation that supports both.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $supports_input = $implementation;
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4382,8 +4404,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Nothing from the filter, so consult image metadata if we have it.
</span><span class="cx" style="display: block; padding: 0 10px"> $size_meta = $meta['sizes'][ $size ];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // We have the actual image size, but might need to further constrain it if content_width is narrower.
- // Thumbnail, medium, and full sizes are also checked against the site's height/width options.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * We have the actual image size, but might need to further constrain it if content_width is narrower.
+ * Thumbnail, medium, and full sizes are also checked against the site's height/width options.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> list( $width, $height ) = image_constrain_size_for_editor( $size_meta['width'], $size_meta['height'], $size, 'edit' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $sizes[ $size ] = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4513,8 +4537,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $args = wp_parse_args( $args, $defaults );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // We're going to pass the old thickbox media tabs to `media_upload_tabs`
- // to ensure plugins will work. We will then unset those tabs.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * We're going to pass the old thickbox media tabs to `media_upload_tabs`
+ * to ensure plugins will work. We will then unset those tabs.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $tabs = array(
</span><span class="cx" style="display: block; padding: 0 10px"> // handler action suffix => tab label
</span><span class="cx" style="display: block; padding: 0 10px"> 'type' => '',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4858,8 +4884,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $strings['settings'] = $settings;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Ensure we enqueue media-editor first, that way media-views
- // is registered internally before we try to localize it. See #24724.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Ensure we enqueue media-editor first, that way media-views
+ * is registered internally before we try to localize it. See #24724.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_enqueue_script( 'media-editor' );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_localize_script( 'media-views', '_wpMediaViewsL10n', $strings );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5454,8 +5482,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $info;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // For PHP versions that don't support WebP images,
- // extract the image size info from the file headers.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * For PHP versions that don't support WebP images,
+ * extract the image size info from the file headers.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'image/webp' === wp_get_image_mime( $filename ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $webp_info = wp_get_webp_info( $filename );
</span><span class="cx" style="display: block; padding: 0 10px"> $width = $webp_info['width'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5516,8 +5546,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return compact( 'width', 'height', 'type' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // The headers are a little different for each of the three formats.
- // Header values based on WebP docs, see https://developers.google.com/speed/webp/docs/riff_container.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * The headers are a little different for each of the three formats.
+ * Header values based on WebP docs, see https://developers.google.com/speed/webp/docs/riff_container.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> switch ( substr( $magic, 12, 4 ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Lossy WebP.
</span><span class="cx" style="display: block; padding: 0 10px"> case 'VP8 ':
</span></span></pre></div>
<a id="trunksrcwpincludesmetaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/meta.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/meta.php 2023-07-10 22:18:27 UTC (rev 56190)
+++ trunk/src/wp-includes/meta.php 2023-07-10 22:36:06 UTC (rev 56191)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -910,8 +910,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $original_key = $meta->meta_key;
</span><span class="cx" style="display: block; padding: 0 10px"> $object_id = $meta->{$column};
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // If a new meta_key (last parameter) was specified, change the meta key,
- // otherwise use the original key in the update statement.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * If a new meta_key (last parameter) was specified, change the meta key,
+ * otherwise use the original key in the update statement.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( false === $meta_key ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $meta_key = $original_key;
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( ! is_string( $meta_key ) ) {
</span></span></pre>
</div>
</div>
</body>
</html>