<!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>[56180] 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/56180">56180</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/56180","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-09 21:46:24 +0000 (Sun, 09 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>.
Props costdev, audrasjb.
See <a href="https://core.trac.wordpress.org/ticket/58459">#58459</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesclasswpthemephp">trunk/src/wp-includes/class-wp-theme.php</a></li>
<li><a href="#trunksrcwpincludesclasswpuserphp">trunk/src/wp-includes/class-wp-user.php</a></li>
<li><a href="#trunksrcwpincludesclasswpxmlrpcserverphp">trunk/src/wp-includes/class-wp-xmlrpc-server.php</a></li>
<li><a href="#trunksrcwpincludesclasswpphp">trunk/src/wp-includes/class-wp.php</a></li>
<li><a href="#trunksrcwpincludesclasswpdbphp">trunk/src/wp-includes/class-wpdb.php</a></li>
<li><a href="#trunksrcwpincludescommentphp">trunk/src/wp-includes/comment.php</a></li>
<li><a href="#trunksrcwpincludescronphp">trunk/src/wp-includes/cron.php</a></li>
<li><a href="#trunksrcwpincludesdefaultconstantsphp">trunk/src/wp-includes/default-constants.php</a></li>
<li><a href="#trunksrcwpincludesembedphp">trunk/src/wp-includes/embed.php</a></li>
<li><a href="#trunksrcwpincludesfeedphp">trunk/src/wp-includes/feed.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesclasswpthemephp"></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/class-wp-theme.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-theme.php 2023-07-09 21:38:35 UTC (rev 56179)
+++ trunk/src/wp-includes/class-wp-theme.php 2023-07-09 21:46:24 UTC (rev 56180)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -321,8 +321,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->headers = get_file_data( $this->theme_root . '/' . $theme_file, self::$file_headers, 'theme' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Default themes always trump their pretenders.
- // Properly identify default themes that are inside a directory within wp-content/themes.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Default themes always trump their pretenders.
+ * Properly identify default themes that are inside a directory within wp-content/themes.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $default_theme_slug = array_search( $this->headers['Name'], self::$default_themes, true );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $default_theme_slug ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( basename( $this->stylesheet ) != $default_theme_slug ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -389,8 +391,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If we got our data from cache, we can assume that 'template' is pointing to the right place.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_array( $cache ) && $this->template != $this->stylesheet && ! file_exists( $this->theme_root . '/' . $this->template . '/index.php' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // If we're in a directory of themes inside /themes, look for the parent nearby.
- // wp-content/themes/directory-of-themes/*
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * If we're in a directory of themes inside /themes, look for the parent nearby.
+ * wp-content/themes/directory-of-themes/*
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $parent_dir = dirname( $this->stylesheet );
</span><span class="cx" style="display: block; padding: 0 10px"> $directories = search_theme_directories();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -397,8 +401,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( '.' !== $parent_dir && file_exists( $this->theme_root . '/' . $parent_dir . '/' . $this->template . '/index.php' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->template = $parent_dir . '/' . $this->template;
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( $directories && isset( $directories[ $this->template ] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Look for the template in the search_theme_directories() results, in case it is in another theme root.
- // We don't look into directories of themes, just the theme root.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Look for the template in the search_theme_directories() results, in case it is in another theme root.
+ * We don't look into directories of themes, just the theme root.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $theme_root_template = $directories[ $this->template ]['theme_root'];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> // Parent theme is missing.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1665,8 +1671,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> restore_current_blog();
</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 all super old MU back compat joy.
- // 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * This is all super old MU back compat joy.
+ * 'allowedthemes' keys things by stylesheet. 'allowed_themes' keyed things by name.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( false === $allowed_themes[ $blog_id ] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $current ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $allowed_themes[ $blog_id ] = get_option( 'allowed_themes' );
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpuserphp"></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/class-wp-user.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-user.php 2023-07-09 21:38:35 UTC (rev 56179)
+++ trunk/src/wp-includes/class-wp-user.php 2023-07-09 21:46:24 UTC (rev 56180)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -199,8 +199,7 @@
</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 ( 'id' === $field ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Make sure the value is numeric to avoid casting objects, for example,
- // to int 1.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Make sure the value is numeric to avoid casting objects, for example, to int 1.
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_numeric( $value ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpxmlrpcserverphp"></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/class-wp-xmlrpc-server.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-xmlrpc-server.php 2023-07-09 21:38:35 UTC (rev 56179)
+++ trunk/src/wp-includes/class-wp-xmlrpc-server.php 2023-07-09 21:46:24 UTC (rev 56180)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -137,8 +137,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'metaWeblog.getCategories' => 'this:mw_getCategories',
</span><span class="cx" style="display: block; padding: 0 10px"> 'metaWeblog.newMediaObject' => 'this:mw_newMediaObject',
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // MetaWeblog API aliases for Blogger API.
- // See http://www.xmlrpc.com/stories/storyReader$2460
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * MetaWeblog API aliases for Blogger API.
+ * See http://www.xmlrpc.com/stories/storyReader$2460
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> 'metaWeblog.deletePost' => 'this:blogger_deletePost',
</span><span class="cx" style="display: block; padding: 0 10px"> 'metaWeblog.getUsersBlogs' => 'this:blogger_getUsersBlogs',
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3121,8 +3123,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'xmlrpc_call', 'wp.deletePage', $args, $this );
</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 the current page based on the 'page_id' and
- // make sure it is a page and not a post.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Get the current page based on the 'page_id' and
+ * make sure it is a page and not a post.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $actual_page = get_post( $page_id, ARRAY_A );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $actual_page || ( 'page' !== $actual_page['post_type'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 404, __( 'Sorry, no such page.' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3411,14 +3415,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 401, __( 'Sorry, you are not allowed to add a 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">- // If no slug was provided, make it empty
- // so that WordPress will generate one.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * If no slug was provided, make it empty
+ * so that WordPress will generate one.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $category['slug'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $category['slug'] = '';
</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 no parent_id was provided, make it empty
- // so that it will be a top-level page (no parent).
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * If no parent_id was provided, make it empty
+ * so that it will be a top-level page (no parent).
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $category['parent_id'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $category['parent_id'] = '';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5618,8 +5626,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->attach_uploads( $post_id, $post_content );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Handle post formats if assigned, value is validated earlier
- // in this function.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Handle post formats if assigned, value is validated earlier
+ * in this function.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $content_struct['wp_post_format'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> set_post_format( $post_id, $content_struct['wp_post_format'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6998,8 +7008,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</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">- // We're going to use this fake tag to mark the context in a bit.
- // The marker is needed in case the link text appears more than once in the paragraph.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * We're going to use this fake tag to mark the context in a bit.
+ * The marker is needed in case the link text appears more than once in the paragraph.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $excerpt = preg_replace( '|\</?wpcontext\>|', '', $para );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // prevent really long link text
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpphp"></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/class-wp.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp.php 2023-07-09 21:38:35 UTC (rev 56179)
+++ trunk/src/wp-includes/class-wp.php 2023-07-09 21:46:24 UTC (rev 56180)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -200,8 +200,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $self = trim( $self, '/' );
</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 requested permalink is in $pathinfo for path info requests and
- // $req_uri for other requests.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // The requested permalink is in $pathinfo for path info requests and $req_uri for other requests.
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $pathinfo ) && ! preg_match( '|^.*' . $wp_rewrite->index . '$|', $pathinfo ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $requested_path = $pathinfo;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpdbphp"></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/class-wpdb.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wpdb.php 2023-07-09 21:38:35 UTC (rev 56179)
+++ trunk/src/wp-includes/class-wpdb.php 2023-07-09 21:46:24 UTC (rev 56180)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2155,8 +2155,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $host = substr( $host, 0, $socket_pos );
</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">- // We need to check for an IPv6 address first.
- // An IPv6 address will always contain at least two colons.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * We need to check for an IPv6 address first.
+ * An IPv6 address will always contain at least two colons.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( substr_count( $host, ':' ) > 1 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $pattern = '#^(?:\[)?(?P<host>[0-9a-fA-F:]+)(?:\]:(?P<port>[\d]+))?#';
</span><span class="cx" style="display: block; padding: 0 10px"> $is_ipv6 = true;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2213,8 +2215,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"> for ( $tries = 1; $tries <= $this->reconnect_retries; $tries++ ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // On the last try, re-enable warnings. We want to see a single instance
- // of the "unable to connect" message on the bail() screen, if it appears.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * On the last try, re-enable warnings. We want to see a single instance
+ * of the "unable to connect" message on the bail() screen, if it appears.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $this->reconnect_retries === $tries && WP_DEBUG ) {
</span><span class="cx" style="display: block; padding: 0 10px"> error_reporting( $error_reporting );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2230,8 +2234,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> sleep( 1 );
</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 template_redirect has already happened, it's too late for wp_die()/dead_db().
- // Let's just return and hope for the best.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * If template_redirect has already happened, it's too late for wp_die()/dead_db().
+ * Let's just return and hope for the best.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( did_action( 'template_redirect' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2264,8 +2270,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // We weren't able to reconnect, so we better bail.
</span><span class="cx" style="display: block; padding: 0 10px"> $this->bail( $message, 'db_connect_fail' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Call dead_db() if bail didn't die, because this database is no more.
- // It has ceased to be (at least temporarily).
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Call dead_db() if bail didn't die, because this database is no more.
+ * It has ceased to be (at least temporarily).
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> dead_db();
</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">@@ -2313,8 +2321,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // If we're writing to the database, make sure the query will write safely.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $this->check_current_query && ! $this->check_ascii( $query ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $stripped_query = $this->strip_invalid_text_from_query( $query );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // strip_invalid_text_from_query() can perform queries, so we need
- // to flush again, just to make sure everything is clear.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * strip_invalid_text_from_query() can perform queries, so we need
+ * to flush again, just to make sure everything is clear.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->flush();
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $stripped_query !== $query ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->insert_id = 0;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2342,8 +2352,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $this->dbh instanceof mysqli ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $mysql_errno = mysqli_errno( $this->dbh );
</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">- // $dbh is defined, but isn't a real connection.
- // Something has gone horribly wrong, let's try a reconnect.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * $dbh is defined, but isn't a real connection.
+ * Something has gone horribly wrong, let's try a reconnect.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $mysql_errno = 2006;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3122,8 +3134,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Return an integer-keyed array of row objects.
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->last_result;
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( OBJECT_K === $output ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Return an array of row objects with keys from column 1.
- // (Duplicates are discarded.)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Return an array of row objects with keys from column 1.
+ * (Duplicates are discarded.)
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $this->last_result ) {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $this->last_result as $row ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $var_by_ref = get_object_vars( $row );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3529,8 +3543,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $truncate_by_byte_length = 'byte' === $value['length']['type'];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $length = false;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Since we have no length, we'll never truncate. Initialize the variable to false.
- // True would take us through an unnecessary (for this case) codepath below.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Since we have no length, we'll never truncate. Initialize the variable to false.
+ * True would take us through an unnecessary (for this case) codepath below.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $truncate_by_byte_length = false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludescommentphp"></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/comment.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/comment.php 2023-07-09 21:38:35 UTC (rev 56179)
+++ trunk/src/wp-includes/comment.php 2023-07-09 21:46:24 UTC (rev 56180)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -651,8 +651,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_allow_comment( $commentdata, $wp_error = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Simple duplicate check.
- // expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content)
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Simple duplicate check.
+ * expected_slashed ($comment_post_ID, $comment_author, $comment_author_email, $comment_content)
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $dupe = $wpdb->prepare(
</span><span class="cx" style="display: block; padding: 0 10px"> "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_parent = %s AND comment_approved != 'trash' AND ( comment_author = %s ",
</span><span class="cx" style="display: block; padding: 0 10px"> wp_unslash( $commentdata['comment_post_ID'] ),
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1352,8 +1354,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $word ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> continue; }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Do some escaping magic so that '#' chars
- // in the spam words don't break things:
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Do some escaping magic so that '#' chars in the spam words don't break things:
</ins><span class="cx" style="display: block; padding: 0 10px"> $word = preg_quote( $word, '#' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $pattern = "#$word#iu";
</span></span></pre></div>
<a id="trunksrcwpincludescronphp"></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/cron.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/cron.php 2023-07-09 21:38:35 UTC (rev 56179)
+++ trunk/src/wp-includes/cron.php 2023-07-09 21:46:24 UTC (rev 56180)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -541,8 +541,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * if unscheduling one or more events fail.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_clear_scheduled_hook( $hook, $args = array(), $wp_error = false ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Backward compatibility.
- // Previously, this function took the arguments as discrete vars rather than an array like the rest of the API.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Backward compatibility.
+ * Previously, this function took the arguments as discrete vars rather than an array like the rest of the API.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_array( $args ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> _deprecated_argument( __FUNCTION__, '3.0.0', __( 'This argument has changed to an array to match the behavior of the other cron functions.' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $args = array_slice( func_get_args(), 1 ); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
</span></span></pre></div>
<a id="trunksrcwpincludesdefaultconstantsphp"></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/default-constants.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/default-constants.php 2023-07-09 21:38:35 UTC (rev 56179)
+++ trunk/src/wp-includes/default-constants.php 2023-07-09 21:46:24 UTC (rev 56180)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -95,8 +95,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">- // Add define( 'WP_DEBUG_DISPLAY', null ); to wp-config.php to use the globally configured setting
- // for 'display_errors' and not force errors to be displayed. Use false to force 'display_errors' off.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Add define( 'WP_DEBUG_DISPLAY', null ); to wp-config.php to use the globally configured setting
+ * for 'display_errors' and not force errors to be displayed. Use false to force 'display_errors' off.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! defined( 'WP_DEBUG_DISPLAY' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> define( 'WP_DEBUG_DISPLAY', true );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -110,8 +112,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> define( 'WP_CACHE', false );
</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">- // Add define( 'SCRIPT_DEBUG', true ); to wp-config.php to enable loading of non-minified,
- // non-concatenated scripts and stylesheets.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Add define( 'SCRIPT_DEBUG', true ); to wp-config.php to enable loading of non-minified,
+ * non-concatenated scripts and stylesheets.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! defined( 'SCRIPT_DEBUG' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $wp_version ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $develop_src = str_contains( $wp_version, '-src' );
</span></span></pre></div>
<a id="trunksrcwpincludesembedphp"></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/embed.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/embed.php 2023-07-09 21:38:35 UTC (rev 56179)
+++ trunk/src/wp-includes/embed.php 2023-07-09 21:46:24 UTC (rev 56180)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -510,11 +510,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> esc_attr( $secret )
</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">- // Note that the script must be placed after the <blockquote> and <iframe> due to a regexp parsing issue in
- // `wp_filter_oembed_result()`. Because of the regex pattern starts with `|(<blockquote>.*?</blockquote>)?.*|`
- // wherein the <blockquote> is marked as being optional, if it is not at the beginning of the string then the group
- // will fail to match and everything will be matched by `.*` and not included in the group. This regex issue goes
- // back to WordPress 4.4, so in order to not break older installs this script must come at the end.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * Note that the script must be placed after the <blockquote> and <iframe> due to a regexp parsing issue in
+ * `wp_filter_oembed_result()`. Because of the regex pattern starts with `|(<blockquote>.*?</blockquote>)?.*|`
+ * wherein the <blockquote> is marked as being optional, if it is not at the beginning of the string then the group
+ * will fail to match and everything will be matched by `.*` and not included in the group. This regex issue goes
+ * back to WordPress 4.4, so in order to not break older installs this script must come at the end.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $output .= wp_get_inline_script_tag(
</span><span class="cx" style="display: block; padding: 0 10px"> file_get_contents( ABSPATH . WPINC . '/js/wp-embed' . wp_scripts_get_suffix() . '.js' )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span></span></pre></div>
<a id="trunksrcwpincludesfeedphp"></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/feed.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/feed.php 2023-07-09 21:38:35 UTC (rev 56179)
+++ trunk/src/wp-includes/feed.php 2023-07-09 21:46:24 UTC (rev 56180)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -797,8 +797,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $feed = new SimplePie();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $feed->set_sanitize_class( 'WP_SimplePie_Sanitize_KSES' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // We must manually overwrite $feed->sanitize because SimplePie's constructor
- // sets it before we have a chance to set the sanitization class.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /*
+ * We must manually overwrite $feed->sanitize because SimplePie's constructor
+ * sets it before we have a chance to set the sanitization class.
+ */
</ins><span class="cx" style="display: block; padding: 0 10px"> $feed->sanitize = new WP_SimplePie_Sanitize_KSES();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Register the cache handler using the recommended method for SimplePie 1.3 or later.
</span></span></pre>
</div>
</div>
</body>
</html>