<!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>[58097] trunk: Bootstrap/Load: Add support for custom ports in multisite site addresses.</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/58097">58097</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/58097","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>johnbillion</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2024-05-04 19:23:31 +0000 (Sat, 04 May 2024)</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'>Bootstrap/Load: Add support for custom ports in multisite site addresses.

This allows a Multisite network to use an address that includes a port name, such as `example.com:1234`, and adds support for this to the local development environment too. You can now run a Multisite installation on the local development environment, for example at `localhost:8889`.

This also fixes some bugs with running a single site installation on a port, and updates the testing infrastructure so that the whole test suite runs both with and without a port number.

Props djzone, scribu, nacin, ipstenu, F J Kaiser, jeremyfelt, johnjamesjacoby, spacedmonkey, PerS, Clorith, Blackbam, enrico.sorcinelli, Jules Colle, obliviousharmony, desrosj, johnbillion

Fixes <a href="https://core.trac.wordpress.org/ticket/21077">#21077</a>, <a href="https://core.trac.wordpress.org/ticket/52088">#52088</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkenv">trunk/.env</a></li>
<li><a href="#trunkgithubworkflowsphpunittestsrunyml">trunk/.github/workflows/phpunit-tests-run.yml</a></li>
<li><a href="#trunkgithubworkflowsphpunittestsyml">trunk/.github/workflows/phpunit-tests.yml</a></li>
<li><a href="#trunksrcwpadminincludesnetworkphp">trunk/src/wp-admin/includes/network.php</a></li>
<li><a href="#trunksrcwpadminnetworksiteinfophp">trunk/src/wp-admin/network/site-info.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>
<li><a href="#trunksrcwpincludesmediaphp">trunk/src/wp-includes/media.php</a></li>
<li><a href="#trunksrcwpincludesmssitephp">trunk/src/wp-includes/ms-site.php</a></li>
<li><a href="#trunktestsphpunittestsadminwpCommentsListTablephp">trunk/tests/phpunit/tests/admin/wpCommentsListTable.php</a></li>
<li><a href="#trunktestsphpunittestsadminwpPostCommentsListTablephp">trunk/tests/phpunit/tests/admin/wpPostCommentsListTable.php</a></li>
<li><a href="#trunktestsphpunittestsadminwpPrivacyRequestsTablephp">trunk/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php</a></li>
<li><a href="#trunktestsphpunittestsdategetPermalinkphp">trunk/tests/phpunit/tests/date/getPermalink.php</a></li>
<li><a href="#trunktestsphpunittestsdependenciesscriptsphp">trunk/tests/phpunit/tests/dependencies/scripts.php</a></li>
<li><a href="#trunktestsphpunittestsfunctionsrefererphp">trunk/tests/phpunit/tests/functions/referer.php</a></li>
<li><a href="#trunktestsphpunittestsfunctionswpNonceAysphp">trunk/tests/phpunit/tests/functions/wpNonceAys.php</a></li>
<li><a href="#trunktestsphpunittestsgeneralfeedLinksExtraphp">trunk/tests/phpunit/tests/general/feedLinksExtra.php</a></li>
<li><a href="#trunktestsphpunittestsksesphp">trunk/tests/phpunit/tests/kses.php</a></li>
<li><a href="#trunktestsphpunittestsmediagetAdjacentImageLinkphp">trunk/tests/phpunit/tests/media/getAdjacentImageLink.php</a></li>
<li><a href="#trunktestsphpunittestsmediagetNextImageLinkphp">trunk/tests/phpunit/tests/media/getNextImageLink.php</a></li>
<li><a href="#trunktestsphpunittestsmediagetPreviousImageLinkphp">trunk/tests/phpunit/tests/media/getPreviousImageLink.php</a></li>
<li><a href="#trunktestsphpunittestsmedianextImageLinkphp">trunk/tests/phpunit/tests/media/nextImageLink.php</a></li>
<li><a href="#trunktestsphpunittestsmediapreviousImageLinkphp">trunk/tests/phpunit/tests/media/previousImageLink.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitesitephp">trunk/tests/phpunit/tests/multisite/site.php</a></li>
<li><a href="#trunktestsphpunittestsmultisitewpMsUsersListTablephp">trunk/tests/phpunit/tests/multisite/wpMsUsersListTable.php</a></li>
<li><a href="#trunktestsphpunittestspluggablewpMailphp">trunk/tests/phpunit/tests/pluggable/wpMail.php</a></li>
<li><a href="#trunktestsphpunittestspostwpGetAttachmentLinkphp">trunk/tests/phpunit/tests/post/wpGetAttachmentLink.php</a></li>
<li><a href="#trunktestsphpunittestsprivacywpPrivacyGeneratePersonalDataExportFilephp">trunk/tests/phpunit/tests/privacy/wpPrivacyGeneratePersonalDataExportFile.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestschemasetupphp">trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php</a></li>
<li><a href="#trunktestsphpunittestsrestapirestwidgetscontrollerphp">trunk/tests/phpunit/tests/rest-api/rest-widgets-controller.php</a></li>
<li><a href="#trunktestsphpunittestsuserwpListAuthorsphp">trunk/tests/phpunit/tests/user/wpListAuthors.php</a></li>
<li><a href="#trunktestsphpunittestsuserwpListUsersphp">trunk/tests/phpunit/tests/user/wpListUsers.php</a></li>
<li><a href="#trunktoolslocalenvdefaulttemplate">trunk/tools/local-env/default.template</a></li>
<li><a href="#trunktoolslocalenvscriptsinstalljs">trunk/tools/local-env/scripts/install.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkenv"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.env</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.env        2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/.env  2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,6 +53,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ##
</span><span class="cx" style="display: block; padding: 0 10px"> LOCAL_DB_VERSION=8.0
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+# Whether or not to enable multisite.
+LOCAL_MULTISITE=false
+
</ins><span class="cx" style="display: block; padding: 0 10px"> # The debug settings to add to `wp-config.php`.
</span><span class="cx" style="display: block; padding: 0 10px"> LOCAL_WP_DEBUG=true
</span><span class="cx" style="display: block; padding: 0 10px"> LOCAL_WP_DEBUG_LOG=true
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -60,6 +63,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> LOCAL_SCRIPT_DEBUG=true
</span><span class="cx" style="display: block; padding: 0 10px"> LOCAL_WP_ENVIRONMENT_TYPE=local
</span><span class="cx" style="display: block; padding: 0 10px"> LOCAL_WP_DEVELOPMENT_MODE=core
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+LOCAL_WP_TESTS_DOMAIN=example.org
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> # The URL to use when running e2e tests.
</span><span class="cx" style="display: block; padding: 0 10px"> WP_BASE_URL=http://localhost:${LOCAL_PORT}
</span></span></pre></div>
<a id="trunkgithubworkflowsphpunittestsrunyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.github/workflows/phpunit-tests-run.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/phpunit-tests-run.yml     2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/.github/workflows/phpunit-tests-run.yml       2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,6 +40,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">         required: false
</span><span class="cx" style="display: block; padding: 0 10px">         type: 'string'
</span><span class="cx" style="display: block; padding: 0 10px">         default: 'phpunit.xml.dist'
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+      tests-domain:
+        description: 'The domain to use for the tests'
+        required: false
+        type: 'string'
+        default: 'example.org'
</ins><span class="cx" style="display: block; padding: 0 10px">       report:
</span><span class="cx" style="display: block; padding: 0 10px">         description: 'Whether to report results to WordPress.org Hosting Tests'
</span><span class="cx" style="display: block; padding: 0 10px">         required: false
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -50,6 +55,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   LOCAL_DB_TYPE: ${{ inputs.db-type }}
</span><span class="cx" style="display: block; padding: 0 10px">   LOCAL_DB_VERSION: ${{ inputs.db-version }}
</span><span class="cx" style="display: block; padding: 0 10px">   LOCAL_PHP_MEMCACHED: ${{ inputs.memcached }}
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  LOCAL_WP_TESTS_DOMAIN: ${{ inputs.tests-domain }}
</ins><span class="cx" style="display: block; padding: 0 10px">   PHPUNIT_CONFIG: ${{ inputs.phpunit-config }}
</span><span class="cx" style="display: block; padding: 0 10px">   PUPPETEER_SKIP_DOWNLOAD: ${{ true }}
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -74,7 +80,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">   # - Checks out the WordPress Test reporter repository.
</span><span class="cx" style="display: block; padding: 0 10px">   # - Submit the test results to the WordPress.org host test results.
</span><span class="cx" style="display: block; padding: 0 10px">   phpunit-tests:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-    name: PHP ${{ inputs.php }} / ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }}
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+    name: PHP ${{ inputs.php }} / ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
</ins><span class="cx" style="display: block; padding: 0 10px">     runs-on: ${{ inputs.os }}
</span><span class="cx" style="display: block; padding: 0 10px">     timeout-minutes: 20
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunkgithubworkflowsphpunittestsyml"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/.github/workflows/phpunit-tests.yml</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/.github/workflows/phpunit-tests.yml 2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/.github/workflows/phpunit-tests.yml   2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -48,6 +48,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
</span><span class="cx" style="display: block; padding: 0 10px">         db-type: [ 'mysql' ]
</span><span class="cx" style="display: block; padding: 0 10px">         db-version: [ '5.7', '8.0', '8.1', '8.2', '8.3' ]
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        tests-domain: [ 'example.org' ]
</ins><span class="cx" style="display: block; padding: 0 10px">         multisite: [ false, true ]
</span><span class="cx" style="display: block; padding: 0 10px">         memcached: [ false ]
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -57,6 +58,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">             php: '7.4'
</span><span class="cx" style="display: block; padding: 0 10px">             db-type: 'mysql'
</span><span class="cx" style="display: block; padding: 0 10px">             db-version: '5.7'
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+            tests-domain: 'example.org'
</ins><span class="cx" style="display: block; padding: 0 10px">             multisite: false
</span><span class="cx" style="display: block; padding: 0 10px">             memcached: true
</span><span class="cx" style="display: block; padding: 0 10px">           - os: ubuntu-latest
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -63,13 +65,30 @@
</span><span class="cx" style="display: block; padding: 0 10px">             php: '7.4'
</span><span class="cx" style="display: block; padding: 0 10px">             db-type: 'mysql'
</span><span class="cx" style="display: block; padding: 0 10px">             db-version: '5.7'
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+            tests-domain: 'example.org'
</ins><span class="cx" style="display: block; padding: 0 10px">             multisite: true
</span><span class="cx" style="display: block; padding: 0 10px">             memcached: true
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+          # Include jobs with a port on the test domain for both single and multisite.
+          - os: ubuntu-latest
+            php: '7.4'
+            db-type: 'mysql'
+            db-version: '5.7'
+            tests-domain: 'example.org:8889'
+            multisite: false
+            memcached: false
+          - os: ubuntu-latest
+            php: '7.4'
+            db-type: 'mysql'
+            db-version: '5.7'
+            tests-domain: 'example.org:8889'
+            multisite: true
+            memcached: false
</ins><span class="cx" style="display: block; padding: 0 10px">           # Report test results to the Host Test Results.
</span><span class="cx" style="display: block; padding: 0 10px">           - os: ubuntu-latest
</span><span class="cx" style="display: block; padding: 0 10px">             php: '7.4'
</span><span class="cx" style="display: block; padding: 0 10px">             db-type: 'mysql'
</span><span class="cx" style="display: block; padding: 0 10px">             db-version: '5.7'
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+            tests-domain: 'example.org'
</ins><span class="cx" style="display: block; padding: 0 10px">             multisite: false
</span><span class="cx" style="display: block; padding: 0 10px">             memcached: false
</span><span class="cx" style="display: block; padding: 0 10px">             report: true
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -81,6 +100,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">       multisite: ${{ matrix.multisite }}
</span><span class="cx" style="display: block; padding: 0 10px">       memcached: ${{ matrix.memcached }}
</span><span class="cx" style="display: block; padding: 0 10px">       phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+      tests-domain: ${{ matrix.tests-domain }}
</ins><span class="cx" style="display: block; padding: 0 10px">       report: ${{ matrix.report || 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="trunksrcwpadminincludesnetworkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/network.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/network.php   2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/src/wp-admin/includes/network.php     2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,27 +148,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">                die();
</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">-        $hostname  = get_clean_basedomain();
-       $has_ports = strstr( $hostname, ':' );
-       if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ), true ) ) ) {
-               wp_admin_notice(
-                       '<strong>' . __( 'Error:' ) . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ),
-                       array(
-                               'additional_classes' => array( 'error' ),
-                       )
-               );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Strip standard port from hostname.
+       $hostname = preg_replace( '/(?::80|:443)$/', '', get_clean_basedomain() );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                echo '<p>' . sprintf(
-                       /* translators: %s: Port number. */
-                       __( 'You cannot use port numbers such as %s.' ),
-                       '<code>' . $has_ports . '</code>'
-               ) . '</p>';
-               echo '<a href="' . esc_url( admin_url() ) . '">' . __( 'Go to Dashboard' ) . '</a>';
-               echo '</div>';
-               require_once ABSPATH . 'wp-admin/admin-footer.php';
-               die();
-       }
-
</del><span class="cx" style="display: block; padding: 0 10px">         echo '<form method="post">';
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        wp_nonce_field( 'install-network-1' );
</span></span></pre></div>
<a id="trunksrcwpadminnetworksiteinfophp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/network/site-info.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network/site-info.php  2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/src/wp-admin/network/site-info.php    2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -66,8 +66,14 @@
</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">                $blog_data['scheme'] = $update_parsed_url['scheme'];
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+               // Make sure to not lose the port if it was provided.
</ins><span class="cx" style="display: block; padding: 0 10px">                 $blog_data['domain'] = $update_parsed_url['host'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $blog_data['path']   = $update_parsed_url['path'];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if ( isset( $update_parsed_url['port'] ) ) {
+                       $blog_data['domain'] .= ':' . $update_parsed_url['port'];
+               }
+
+               $blog_data['path'] = $update_parsed_url['path'];
</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">        $existing_details     = get_site( $id );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -88,8 +94,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        $old_home_url    = trailingslashit( esc_url( get_option( 'home' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px">        $old_home_parsed = parse_url( $old_home_url );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        $old_home_host   = $old_home_parsed['host'] . ( isset( $old_home_parsed['port'] ) ? ':' . $old_home_parsed['port'] : '' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        if ( $old_home_parsed['host'] === $existing_details->domain && $old_home_parsed['path'] === $existing_details->path ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $old_home_host === $existing_details->domain && $old_home_parsed['path'] === $existing_details->path ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                 $new_home_url = untrailingslashit( sanitize_url( $blog_data['scheme'] . '://' . $new_details->domain . $new_details->path ) );
</span><span class="cx" style="display: block; padding: 0 10px">                update_option( 'home', $new_home_url );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -96,8 +103,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        $old_site_url    = trailingslashit( esc_url( get_option( 'siteurl' ) ) );
</span><span class="cx" style="display: block; padding: 0 10px">        $old_site_parsed = parse_url( $old_site_url );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        $old_site_host   = $old_site_parsed['host'] . ( isset( $old_site_parsed['port'] ) ? ':' . $old_site_parsed['port'] : '' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        if ( $old_site_parsed['host'] === $existing_details->domain && $old_site_parsed['path'] === $existing_details->path ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $old_site_host === $existing_details->domain && $old_site_parsed['path'] === $existing_details->path ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                 $new_site_url = untrailingslashit( sanitize_url( $blog_data['scheme'] . '://' . $new_details->domain . $new_details->path ) );
</span><span class="cx" style="display: block; padding: 0 10px">                update_option( 'siteurl', $new_site_url );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</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   2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/src/wp-includes/embed.php     2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -627,12 +627,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        wp_parse_url( $url ),
</span><span class="cx" style="display: block; padding: 0 10px">                        array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'host' => '',
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                'port' => null,
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'path' => '/',
</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><span class="cx" style="display: block; padding: 0 10px">                $qv = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'domain'                 => $url_parts['host'],
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 'domain'                 => $url_parts['host'] . ( $url_parts['port'] ? ':' . $url_parts['port'] : '' ),
</ins><span class="cx" style="display: block; padding: 0 10px">                         'path'                   => '/',
</span><span class="cx" style="display: block; padding: 0 10px">                        'update_site_meta_cache' => false,
</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    2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/src/wp-includes/feed.php      2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -660,8 +660,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">  * @return string Correct link for the atom:self element.
</span><span class="cx" style="display: block; padding: 0 10px">  */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_self_link() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $host = parse_url( home_url() );
-       return set_url_scheme( 'http://' . $host['host'] . wp_unslash( $_SERVER['REQUEST_URI'] ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $parsed = parse_url( home_url() );
+
+       $domain = $parsed['host'];
+       if ( isset( $parsed['port'] ) ) {
+               $domain .= ':' . $parsed['port'];
+       }
+
+       return set_url_scheme( 'http://' . $domain . wp_unslash( $_SERVER['REQUEST_URI'] ) );
</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"> /**
</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   2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/src/wp-includes/media.php     2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1363,8 +1363,17 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * If currently on HTTPS, prefer HTTPS URLs when we know they're supported by the domain
</span><span class="cx" style="display: block; padding: 0 10px">         * (which is to say, when they share the domain name of the current request).
</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 ( is_ssl() && ! str_starts_with( $image_baseurl, 'https' ) && parse_url( $image_baseurl, PHP_URL_HOST ) === $_SERVER['HTTP_HOST'] ) {
-               $image_baseurl = set_url_scheme( $image_baseurl, 'https' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( is_ssl() && ! str_starts_with( $image_baseurl, 'https' ) ) {
+               // Since the `Host:` header might contain a port we should
+               // compare it against the image URL using the same port.
+               $parsed = parse_url( $image_baseurl );
+               $domain = $parsed['host'];
+               if ( isset( $parsed['port'] ) ) {
+                       $domain .= ':' . $parsed['port'];
+               }
+               if ( $_SERVER['HTTP_HOST'] === $domain ) {
+                       $image_baseurl = set_url_scheme( $image_baseurl, 'https' );
+               }
</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">        /*
</span></span></pre></div>
<a id="trunksrcwpincludesmssitephp"></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/ms-site.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/ms-site.php 2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/src/wp-includes/ms-site.php   2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -524,11 +524,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_normalize_site_data( $data ) {
</span><span class="cx" style="display: block; padding: 0 10px">        // Sanitize domain if passed.
</span><span class="cx" style="display: block; padding: 0 10px">        if ( array_key_exists( 'domain', $data ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $data['domain'] = trim( $data['domain'] );
-               $data['domain'] = preg_replace( '/\s+/', '', sanitize_user( $data['domain'], true ) );
-               if ( is_subdomain_install() ) {
-                       $data['domain'] = str_replace( '@', '', $data['domain'] );
-               }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $data['domain'] = preg_replace( '/[^a-z0-9\-.:]+/i', '', $data['domain'] );
</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">        // Sanitize path if passed.
</span></span></pre></div>
<a id="trunktestsphpunittestsadminwpCommentsListTablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/admin/wpCommentsListTable.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/admin/wpCommentsListTable.php   2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/admin/wpCommentsListTable.php     2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -204,12 +204,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->table->prepare_items();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $expected = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'all'       => '<a href="http://example.org/wp-admin/edit-comments.php?comment_status=all" class="current" aria-current="page">All <span class="count">(<span class="all-count">0</span>)</span></a>',
-                       'mine'      => '<a href="http://example.org/wp-admin/edit-comments.php?comment_status=mine&#038;user_id=0">Mine <span class="count">(<span class="mine-count">0</span>)</span></a>',
-                       'moderated' => '<a href="http://example.org/wp-admin/edit-comments.php?comment_status=moderated">Pending <span class="count">(<span class="pending-count">0</span>)</span></a>',
-                       'approved'  => '<a href="http://example.org/wp-admin/edit-comments.php?comment_status=approved">Approved <span class="count">(<span class="approved-count">0</span>)</span></a>',
-                       'spam'      => '<a href="http://example.org/wp-admin/edit-comments.php?comment_status=spam">Spam <span class="count">(<span class="spam-count">0</span>)</span></a>',
-                       'trash'     => '<a href="http://example.org/wp-admin/edit-comments.php?comment_status=trash">Trash <span class="count">(<span class="trash-count">0</span>)</span></a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 'all'       => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-comments.php?comment_status=all" class="current" aria-current="page">All <span class="count">(<span class="all-count">0</span>)</span></a>',
+                       'mine'      => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-comments.php?comment_status=mine&#038;user_id=0">Mine <span class="count">(<span class="mine-count">0</span>)</span></a>',
+                       'moderated' => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-comments.php?comment_status=moderated">Pending <span class="count">(<span class="pending-count">0</span>)</span></a>',
+                       'approved'  => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-comments.php?comment_status=approved">Approved <span class="count">(<span class="approved-count">0</span>)</span></a>',
+                       'spam'      => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-comments.php?comment_status=spam">Spam <span class="count">(<span class="spam-count">0</span>)</span></a>',
+                       'trash'     => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-comments.php?comment_status=trash">Trash <span class="count">(<span class="trash-count">0</span>)</span></a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                 );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $expected, $this->table->get_views() );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre></div>
<a id="trunktestsphpunittestsadminwpPostCommentsListTablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/admin/wpPostCommentsListTable.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/admin/wpPostCommentsListTable.php       2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/admin/wpPostCommentsListTable.php 2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,12 +26,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $this->table->prepare_items();
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $expected = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'all'       => '<a href="http://example.org/wp-admin/edit-comments.php?comment_status=all" class="current" aria-current="page">All <span class="count">(<span class="all-count">0</span>)</span></a>',
-                       'mine'      => '<a href="http://example.org/wp-admin/edit-comments.php?comment_status=mine&#038;user_id=0">Mine <span class="count">(<span class="mine-count">0</span>)</span></a>',
-                       'moderated' => '<a href="http://example.org/wp-admin/edit-comments.php?comment_status=moderated">Pending <span class="count">(<span class="pending-count">0</span>)</span></a>',
-                       'approved'  => '<a href="http://example.org/wp-admin/edit-comments.php?comment_status=approved">Approved <span class="count">(<span class="approved-count">0</span>)</span></a>',
-                       'spam'      => '<a href="http://example.org/wp-admin/edit-comments.php?comment_status=spam">Spam <span class="count">(<span class="spam-count">0</span>)</span></a>',
-                       'trash'     => '<a href="http://example.org/wp-admin/edit-comments.php?comment_status=trash">Trash <span class="count">(<span class="trash-count">0</span>)</span></a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 'all'       => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-comments.php?comment_status=all" class="current" aria-current="page">All <span class="count">(<span class="all-count">0</span>)</span></a>',
+                       'mine'      => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-comments.php?comment_status=mine&#038;user_id=0">Mine <span class="count">(<span class="mine-count">0</span>)</span></a>',
+                       'moderated' => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-comments.php?comment_status=moderated">Pending <span class="count">(<span class="pending-count">0</span>)</span></a>',
+                       'approved'  => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-comments.php?comment_status=approved">Approved <span class="count">(<span class="approved-count">0</span>)</span></a>',
+                       'spam'      => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-comments.php?comment_status=spam">Spam <span class="count">(<span class="spam-count">0</span>)</span></a>',
+                       'trash'     => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/edit-comments.php?comment_status=trash">Trash <span class="count">(<span class="trash-count">0</span>)</span></a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                 );
</span><span class="cx" style="display: block; padding: 0 10px">                $this->assertSame( $expected, $this->table->get_views() );
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre></div>
<a id="trunktestsphpunittestsadminwpPrivacyRequestsTablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php        2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php  2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -200,7 +200,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_get_views_should_return_views_by_default() {
</span><span class="cx" style="display: block; padding: 0 10px">                $expected = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'all' => '<a href="http://example.org/wp-admin/export-personal-data.php" class="current" aria-current="page">All <span class="count">(0)</span></a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 'all' => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/export-personal-data.php" class="current" aria-current="page">All <span class="count">(0)</span></a>',
</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">                $this->assertSame( $expected, $this->get_mocked_class_instance()->get_views() );
</span></span></pre></div>
<a id="trunktestsphpunittestsdategetPermalinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/date/getPermalink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/date/getPermalink.php   2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/date/getPermalink.php     2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -35,10 +35,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">-                $this->assertSame( 'http://example.org/2018/07/22/21/13/23', get_permalink( $post_id ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/2018/07/22/21/13/23', get_permalink( $post_id ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // phpcs:ignore WordPress.DateTime.RestrictedFunctions.timezone_change_date_default_timezone_set
</span><span class="cx" style="display: block; padding: 0 10px">                date_default_timezone_set( $timezone );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->assertSame( 'http://example.org/2018/07/22/21/13/23', get_permalink( $post_id ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->assertSame( 'http://' . WP_TESTS_DOMAIN . '/2018/07/22/21/13/23', get_permalink( $post_id ) );
</ins><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="trunktestsphpunittestsdependenciesscriptsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/dependencies/scripts.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/dependencies/scripts.php        2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/dependencies/scripts.php  2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -495,6 +495,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @return array[]
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function data_provider_to_test_various_strategy_dependency_chains() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                $wp_tests_domain = WP_TESTS_DOMAIN;
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 return array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'async-dependent-with-one-blocking-dependency' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'set_up'          => function () {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -881,8 +883,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        wp_enqueue_script( 'theme-functions', 'https://example.com/theme-functions.js', array( 'jquery' ), null, array( 'strategy' => 'defer' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                                },
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_markup' => <<<HTML
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<script type='text/javascript' src='http://example.org/wp-includes/js/jquery/jquery.js' id='jquery-core-js' defer data-wp-strategy='defer'></script>
-<script type='text/javascript' src='http://example.org/wp-includes/js/jquery/jquery-migrate.js' id='jquery-migrate-js' defer data-wp-strategy='defer'></script>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<script type='text/javascript' src='http://$wp_tests_domain/wp-includes/js/jquery/jquery.js' id='jquery-core-js' defer data-wp-strategy='defer'></script>
+<script type='text/javascript' src='http://$wp_tests_domain/wp-includes/js/jquery/jquery-migrate.js' id='jquery-migrate-js' defer data-wp-strategy='defer'></script>
</ins><span class="cx" style="display: block; padding: 0 10px"> <script type='text/javascript' src='https://example.com/theme-functions.js' id='theme-functions-js' defer data-wp-strategy='defer'></script>
</span><span class="cx" style="display: block; padding: 0 10px"> HTML
</span><span class="cx" style="display: block; padding: 0 10px">                                ,
</span></span></pre></div>
<a id="trunktestsphpunittestsfunctionsrefererphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/functions/referer.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/functions/referer.php   2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/functions/referer.php     2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,7 +31,9 @@
</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">        public function filter_allowed_redirect_hosts( $hosts ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $hosts[] = 'another.' . WP_TESTS_DOMAIN;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // Make sure we're only using the hostname and not anything else that might be in the WP_TESTS_DOMAIN.
+               $parsed  = parse_url( 'http://' . WP_TESTS_DOMAIN );
+               $hosts[] = 'another.' . $parsed['host'];
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                return $hosts;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre></div>
<a id="trunktestsphpunittestsfunctionswpNonceAysphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/functions/wpNonceAys.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/functions/wpNonceAys.php        2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/functions/wpNonceAys.php  2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -27,7 +27,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_wp_nonce_ays_log_out() {
</span><span class="cx" style="display: block; padding: 0 10px">                $this->expectException( 'WPDieException' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->expectExceptionMessageMatches( '#You are attempting to log out of Test Blog</p><p>Do you really want to <a href="http://example\.org/wp-login\.php\?action=logout&amp;_wpnonce=.{10}">log out</a>\?#m' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->expectExceptionMessageMatches( '#You are attempting to log out of Test Blog</p><p>Do you really want to <a href="http://' . WP_TESTS_DOMAIN . '/wp-login\.php\?action=logout&amp;_wpnonce=.{10}">log out</a>\?#m' );
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->expectExceptionCode( 403 );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                wp_nonce_ays( 'log-out' );
</span></span></pre></div>
<a id="trunktestsphpunittestsgeneralfeedLinksExtraphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/general/feedLinksExtra.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/general/feedLinksExtra.php      2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/general/feedLinksExtra.php        2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -440,7 +440,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $expected  = '<link rel="alternate" type="application/rss+xml"';
</span><span class="cx" style="display: block; padding: 0 10px">                $expected .= ' title="Test Blog &raquo; Post with no comments Comments Feed"';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $expected .= ' href="http://example.org/?feed=rss2&#038;p=' . self::$post_no_comment_id . '" />' . "\n";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $expected .= ' href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&#038;p=' . self::$post_no_comment_id . '" />' . "\n";
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame( $expected, get_echo( 'feed_links_extra' ) );
</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">@@ -455,7 +455,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $expected  = '<link rel="alternate" type="application/rss+xml"';
</span><span class="cx" style="display: block; padding: 0 10px">                $expected .= ' title="Test Blog &raquo; Post with no comments Comments Feed"';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $expected .= ' href="http://example.org/?feed=rss2&#038;p=' . self::$post_no_comment_id . '" />' . "\n";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $expected .= ' href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&#038;p=' . self::$post_no_comment_id . '" />' . "\n";
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame( $expected, get_echo( 'feed_links_extra' ) );
</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">@@ -470,7 +470,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $expected  = '<link rel="alternate" type="application/rss+xml"';
</span><span class="cx" style="display: block; padding: 0 10px">                $expected .= ' title="Test Blog &raquo; Post with a comment Comments Feed"';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $expected .= ' href="http://example.org/?feed=rss2&#038;p=' . self::$post_with_comment_id . '" />' . "\n";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $expected .= ' href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&#038;p=' . self::$post_with_comment_id . '" />' . "\n";
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame( $expected, get_echo( 'feed_links_extra' ) );
</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">@@ -507,7 +507,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $expected  = '<link rel="alternate" type="testing/foo"';
</span><span class="cx" style="display: block; padding: 0 10px">                $expected .= ' title="Test Blog &raquo; Post with a comment Comments Feed"';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $expected .= ' href="http://example.org/?feed=foo&#038;p=' . self::$post_with_comment_id . '" />' . "\n";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $expected .= ' href="http://' . WP_TESTS_DOMAIN . '/?feed=foo&#038;p=' . self::$post_with_comment_id . '" />' . "\n";
</ins><span class="cx" style="display: block; padding: 0 10px">                 $this->assertSame( $expected, get_echo( 'feed_links_extra' ) );
</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="trunktestsphpunittestsksesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/kses.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/kses.php        2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/kses.php  2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1732,83 +1732,83 @@
</span><span class="cx" style="display: block; padding: 0 10px">        public function data_wp_kses_object_tag_allowed() {
</span><span class="cx" style="display: block; padding: 0 10px">                return array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'valid value for type'                    => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/pdf" data="https://example.org/foo.pdf" />',
-                               '<object type="application/pdf" data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
+                               '<object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'invalid value for type'                  => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/exe" data="https://example.org/foo.exe" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/exe" data="https://' . WP_TESTS_DOMAIN . '/foo.exe" />',
</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">                        'multiple type attributes, last invalid'  => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/pdf" type="application/exe" data="https://example.org/foo.pdf" />',
-                               '<object type="application/pdf" data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/pdf" type="application/exe" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
+                               '<object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'multiple type attributes, first uppercase, last invalid' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object TYPE="application/pdf" type="application/exe" data="https://example.org/foo.pdf" />',
-                               '<object TYPE="application/pdf" data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object TYPE="application/pdf" type="application/exe" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
+                               '<object TYPE="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'multiple type attributes, last upper case and invalid' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/pdf" TYPE="application/exe" data="https://example.org/foo.pdf" />',
-                               '<object type="application/pdf" data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/pdf" TYPE="application/exe" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
+                               '<object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'multiple type attributes, first invalid' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/exe" type="application/pdf" data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/exe" type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</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">                        'multiple type attributes, first upper case and invalid' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object TYPE="application/exe" type="application/pdf" data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object TYPE="application/exe" type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</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">                        'multiple type attributes, first invalid, last uppercase' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/exe" TYPE="application/pdf" data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/exe" TYPE="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</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">                        'multiple object tags, last invalid'      => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/pdf" data="https://example.org/foo.pdf" /><object type="application/exe" data="https://example.org/foo.exe" />',
-                               '<object type="application/pdf" data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" /><object type="application/exe" data="https://' . WP_TESTS_DOMAIN . '/foo.exe" />',
+                               '<object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'multiple object tags, first invalid'     => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/exe" data="https://example.org/foo.exe" /><object type="application/pdf" data="https://example.org/foo.pdf" />',
-                               '<object type="application/pdf" data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/exe" data="https://' . WP_TESTS_DOMAIN . '/foo.exe" /><object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
+                               '<object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'type attribute with partially incorrect value' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/pdfa" data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/pdfa" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</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">                        'type attribute with empty value'         => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="" data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</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">                        'type attribute with no value'            => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</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">                        'no type attribute'                       => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object data="https://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object data="https://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</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">                        'different protocol in url'               => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/pdf" data="http://example.org/foo.pdf" />',
-                               '<object type="application/pdf" data="http://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/pdf" data="http://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
+                               '<object type="application/pdf" data="http://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'query string on url'                     => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/pdf" data="https://example.org/foo.pdf?lol=.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf?lol=.pdf" />',
</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">                        'fragment on url'                         => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/pdf" data="https://example.org/foo.pdf#lol.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.pdf#lol.pdf" />',
</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">                        'wrong extension'                         => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/pdf" data="https://example.org/foo.php" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/foo.php" />',
</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">                        'protocol-relative url'                   => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/pdf" data="//example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/pdf" data="//' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</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">                        'unsupported protocol'                    => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/pdf" data="ftp://example.org/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/pdf" data="ftp://' . WP_TESTS_DOMAIN . '/foo.pdf" />',
</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">                        'relative url'                            => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1816,8 +1816,8 @@
</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">                        'url with port number-like path'          => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                '<object type="application/pdf" data="https://example.org/cat:8888/foo.pdf" />',
-                               '<object type="application/pdf" data="https://example.org/cat:8888/foo.pdf" />',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         '<object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/cat:8888/foo.pdf" />',
+                               '<object type="application/pdf" data="https://' . WP_TESTS_DOMAIN . '/cat:8888/foo.pdf" />',
</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">        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1868,7 +1868,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @return array        $param with a modified `url`.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function wp_kses_upload_dir_filter( $param ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $url_with_port_number = is_string( $param['url'] ) ? str_replace( 'example.org', 'example.org:8888', $param['url'] ) : $param['url'];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         // Take care to replace the entire domain, including cases where it already has a port number.
+               $parsed         = parse_url( $param['url'] );
+               $replace_domain = $parsed['host'];
+               if ( isset( $parsed['port'] ) ) {
+                       $replace_domain .= ':' . $parsed['port'];
+               }
+
+               $url_with_port_number = is_string( $param['url'] ) ? str_replace( $replace_domain, 'example.org:8888', $param['url'] ) : $param['url'];
</ins><span class="cx" style="display: block; padding: 0 10px">                 $param['url']         = $url_with_port_number;
</span><span class="cx" style="display: block; padding: 0 10px">                return $param;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre></div>
<a id="trunktestsphpunittestsmediagetAdjacentImageLinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/media/getAdjacentImageLink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/media/getAdjacentImageLink.php  2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/media/getAdjacentImageLink.php    2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -32,24 +32,24 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'when has previous link'           => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_attachment_index'  => 3,
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_attachment_index' => 2,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image2.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image2.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'with text when has previous link' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_attachment_index'  => 3,
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_attachment_index' => 2,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'>Some text</a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'>Some text</a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'args'                      => array( 'text' => 'Some text' ),
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'when has next link'               => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_attachment_index'  => 4,
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_attachment_index' => 5,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image5.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image5.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'args'                      => array( 'prev' => false ),
</span><span class="cx" style="display: block; padding: 0 10px">                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'with text when has next link'     => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_attachment_index'  => 4,
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_attachment_index' => 5,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'>Some text</a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'>Some text</a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'args'                      => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'prev' => false,
</span><span class="cx" style="display: block; padding: 0 10px">                                        'text' => 'Some text',
</span></span></pre></div>
<a id="trunktestsphpunittestsmediagetNextImageLinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/media/getNextImageLink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/media/getNextImageLink.php      2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/media/getNextImageLink.php        2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,12 +31,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'when has next link'           => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_attachment_index'  => 4,
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_attachment_index' => 5,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image5.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image5.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'with text when has next link' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_attachment_index'  => 4,
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_attachment_index' => 5,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'>Some text</a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'>Some text</a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'args'                      => array( 'text' => 'Some text' ),
</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="trunktestsphpunittestsmediagetPreviousImageLinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/media/getPreviousImageLink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/media/getPreviousImageLink.php  2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/media/getPreviousImageLink.php    2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -31,12 +31,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'when has previous link'           => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_attachment_index'  => 3,
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_attachment_index' => 2,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image2.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image2.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'with text when has previous link' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_attachment_index'  => 3,
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_attachment_index' => 2,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'>Some text</a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'>Some text</a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'args'                      => array( 'text' => 'Some text' ),
</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="trunktestsphpunittestsmedianextImageLinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/media/nextImageLink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/media/nextImageLink.php 2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/media/nextImageLink.php   2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -30,12 +30,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'when has next link'           => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_attachment_index'  => 4,
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_attachment_index' => 5,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image5.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image5.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'with text when has next link' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_attachment_index'  => 4,
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_attachment_index' => 5,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'>Some text</a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'>Some text</a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'args'                      => array( 'text' => 'Some text' ),
</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="trunktestsphpunittestsmediapreviousImageLinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/media/previousImageLink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/media/previousImageLink.php     2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/media/previousImageLink.php       2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -30,12 +30,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'when has previous link'           => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_attachment_index'  => 3,
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_attachment_index' => 2,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image2.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'><img width="1" height="1" src="' . WP_CONTENT_URL . '/uploads/image2.jpg" class="attachment-thumbnail size-thumbnail" alt="" decoding="async" loading="lazy" /></a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'with text when has previous link' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'current_attachment_index'  => 3,
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_attachment_index' => 2,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'                  => '<a href=\'http://example.org/?attachment_id=%%ID%%\'>Some text</a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'                  => '<a href=\'http://' . WP_TESTS_DOMAIN . '/?attachment_id=%%ID%%\'>Some text</a>',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'args'                      => array( 'text' => 'Some text' ),
</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="trunktestsphpunittestsmultisitesitephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/multisite/site.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/site.php      2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/multisite/site.php        2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1140,6 +1140,22 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                'lang_id'  => 1,
</span><span class="cx" style="display: block; padding: 0 10px">                                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                array(
+                                       array(
+                                               'domain' => 'example.com:8888',
+                                       ),
+                                       array(
+                                               'domain'     => 'example.com:8888',
+                                               'path'       => '/',
+                                               'network_id' => 1,
+                                               'public'     => 1,
+                                               'archived'   => 0,
+                                               'mature'     => 0,
+                                               'spam'       => 0,
+                                               'deleted'    => 0,
+                                               'lang_id'    => 0,
+                                       ),
+                               ),
</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"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1242,6 +1258,16 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                'lang_id'  => 1,
</span><span class="cx" style="display: block; padding: 0 10px">                                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                array(
+                                       array(
+                                               'domain'     => 'example.com:8888',
+                                               'network_id' => 2,
+                                       ),
+                                       array(
+                                               'domain'  => 'example.com:8888',
+                                               'site_id' => 2,
+                                       ),
+                               ),
</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"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1358,11 +1384,27 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                'domain' => '<yet>/another-invalid-domain.com',
</span><span class="cx" style="display: block; padding: 0 10px">                                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                                        array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                'domain' => 'another-invalid-domain.com',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                         'domain' => 'yetanother-invalid-domain.com',
</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">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        array(
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                                'domain' => 'with-port.com:8888',
+                                       ),
+                                       array(
+                                               'domain' => 'with-port.com:8888',
+                                       ),
+                               ),
+                               array(
+                                       array(
+                                               'domain' => 'subdomain.with-port.com:8888',
+                                       ),
+                                       array(
+                                               'domain' => 'subdomain.with-port.com:8888',
+                                       ),
+                               ),
+                               array(
+                                       array(
</ins><span class="cx" style="display: block; padding: 0 10px">                                                 'path' => '',
</span><span class="cx" style="display: block; padding: 0 10px">                                        ),
</span><span class="cx" style="display: block; padding: 0 10px">                                        array(
</span></span></pre></div>
<a id="trunktestsphpunittestsmultisitewpMsUsersListTablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/multisite/wpMsUsersListTable.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/multisite/wpMsUsersListTable.php        2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/multisite/wpMsUsersListTable.php  2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -98,8 +98,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $super = count( get_super_admins() );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                $expected = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        'all'   => '<a href="http://example.org/wp-admin/network/users.php" class="current" aria-current="page">All <span class="count">(' . $all . ')</span></a>',
-                       'super' => '<a href="http://example.org/wp-admin/network/users.php?role=super">Super Admin <span class="count">(' . $super . ')</span></a>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 'all'   => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/network/users.php" class="current" aria-current="page">All <span class="count">(' . $all . ')</span></a>',
+                       'super' => '<a href="http://' . WP_TESTS_DOMAIN . '/wp-admin/network/users.php?role=super">Super Admin <span class="count">(' . $super . ')</span></a>',
</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">                $this->assertSame( $expected, $this->table->get_views() );
</span></span></pre></div>
<a id="trunktestsphpunittestspluggablewpMailphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/pluggable/wpMail.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/pluggable/wpMail.php    2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/pluggable/wpMail.php      2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -221,11 +221,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @ticket 30266
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function test_wp_mail_with_empty_from_header() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                // Make sure that we don't add any ports to the from header.
+               $url_parts = parse_url( 'http://' . WP_TESTS_DOMAIN );
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 $to       = 'address@tld.com';
</span><span class="cx" style="display: block; padding: 0 10px">                $subject  = 'Testing';
</span><span class="cx" style="display: block; padding: 0 10px">                $message  = 'Test Message';
</span><span class="cx" style="display: block; padding: 0 10px">                $headers  = 'From: ';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $expected = 'From: WordPress <wordpress@' . WP_TESTS_DOMAIN . '>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $expected = 'From: WordPress <wordpress@' . $url_parts['host'] . '>';
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                wp_mail( $to, $subject, $message, $headers );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunktestsphpunittestspostwpGetAttachmentLinkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/post/wpGetAttachmentLink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/post/wpGetAttachmentLink.php    2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/post/wpGetAttachmentLink.php      2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,7 +61,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                return array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'no new attributes'                         => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'attributes' => array(),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected'   => "<a href='http://example.org/?attachment_id=ATTACHMENT_ID'>",
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected'   => "<a href='http://" . WP_TESTS_DOMAIN . "/?attachment_id=ATTACHMENT_ID'>",
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'one new attribute'                         => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'attributes' => array(
</span></span></pre></div>
<a id="trunktestsphpunittestsprivacywpPrivacyGeneratePersonalDataExportFilephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/privacy/wpPrivacyGeneratePersonalDataExportFile.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/privacy/wpPrivacyGeneratePersonalDataExportFile.php     2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/privacy/wpPrivacyGeneratePersonalDataExportFile.php       2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -374,7 +374,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        $expected .= 'null}';
</span><span class="cx" style="display: block; padding: 0 10px">                } else {
</span><span class="cx" style="display: block; padding: 0 10px">                        // "About" group: to avoid time difference, use the report's "on" timestamp.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        $about_group = '{"about":{"group_label":"About","group_description":"Overview of export report.","items":{"about-1":[{"name":"Report generated for","value":"' . $request->email . '"},{"name":"For site","value":"Test Blog"},{"name":"At URL","value":"http:\/\/example.org"},{"name":"On","value":"{{TIMESTAMP}}"}]}}';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 $about_group = '{"about":{"group_label":"About","group_description":"Overview of export report.","items":{"about-1":[{"name":"Report generated for","value":"' . $request->email . '"},{"name":"For site","value":"Test Blog"},{"name":"At URL","value":"http:\/\/' . WP_TESTS_DOMAIN . '"},{"name":"On","value":"{{TIMESTAMP}}"}]}}';
</ins><span class="cx" style="display: block; padding: 0 10px">                         $expected   .= $this->replace_timestamp_placeholder( $actual_json, $about_group );
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( isset( $expected_content['json'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                $expected .= $expected_content['json'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -469,7 +469,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'should contain only about when empty array' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'groups'           => array(),
</span><span class="cx" style="display: block; padding: 0 10px">                                'expected_content' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'html' => '<h2 id="about-about">About</h2><p>Overview of export report.</p><div><table><tbody><tr><th>Report generated for</th><td>export-requester@example.com</td></tr><tr><th>For site</th><td>Test Blog</td></tr><tr><th>At URL</th><td><a href="http://example.org">http://example.org</a></td></tr><tr><th>On</th><td>{{TIMESTAMP}}</td></tr></tbody></table></div>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 'html' => '<h2 id="about-about">About</h2><p>Overview of export report.</p><div><table><tbody><tr><th>Report generated for</th><td>export-requester@example.com</td></tr><tr><th>For site</th><td>Test Blog</td></tr><tr><th>At URL</th><td><a href="http://' . WP_TESTS_DOMAIN . '">http://' . WP_TESTS_DOMAIN . '</a></td></tr><tr><th>On</th><td>{{TIMESTAMP}}</td></tr></tbody></table></div>',
</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">                        // Happy path.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -513,7 +513,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">                                'expected_content' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'html' => '<div id="table_of_contents"><h2>Table of Contents</h2><ul><li><a href="#about-about">About</a></li><li><a href="#user-user">User</a></li></ul></div><h2 id="about-about">About</h2><p>Overview of export report.</p><div><table><tbody><tr><th>Report generated for</th><td>export-requester@example.com</td></tr><tr><th>For site</th><td>Test Blog</td></tr><tr><th>At URL</th><td><a href="http://example.org">http://example.org</a></td></tr><tr><th>On</th><td>{{TIMESTAMP}}</td></tr></tbody></table><div class="return-to-top">&l
 t;a href="#top"><span aria-hidden="true">&uarr; </span> Go to top</a></div></div><h2 id="user-user">User</h2><p>User&#8217;s profile data.</p><div><table><tbody><tr><th>User ID</th><td>1</td></tr><tr><th>User Login Name</th><td>user_login</td></tr><tr><th>User Nice Name</th><td>User Name</td></tr><tr><th>User Email</th><td>export-requester@example.com</td></tr><tr><th>User Registration Date</th><td>2020-01-31 19:29:29</td></tr><tr><th>User Display Name</th><td>User Name</td></tr><tr><th>User Nickname</th><td>User</td></tr></tbody></table><div class="return-to-top"><a href="#top">&l
 t;span aria-hidden="true">&uarr; </span> Go to top</a></div></div>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 'html' => '<div id="table_of_contents"><h2>Table of Contents</h2><ul><li><a href="#about-about">About</a></li><li><a href="#user-user">User</a></li></ul></div><h2 id="about-about">About</h2><p>Overview of export report.</p><div><table><tbody><tr><th>Report generated for</th><td>export-requester@example.com</td></tr><tr><th>For site</th><td>Test Blog</td></tr><tr><th>At URL</th><td><a href="http://' . WP_TESTS_DOMAIN . '">http://' . WP_TESTS_DOMAIN . '</a></td></tr><tr><th>On</th><td>{{TIMESTAMP}}</td></tr></tbody></table><div class="re
 turn-to-top"><a href="#top"><span aria-hidden="true">&uarr; </span> Go to top</a></div></div><h2 id="user-user">User</h2><p>User&#8217;s profile data.</p><div><table><tbody><tr><th>User ID</th><td>1</td></tr><tr><th>User Login Name</th><td>user_login</td></tr><tr><th>User Nice Name</th><td>User Name</td></tr><tr><th>User Email</th><td>export-requester@example.com</td></tr><tr><th>User Registration Date</th><td>2020-01-31 19:29:29</td></tr><tr><th>User Display Name</th><td>User Name</td></tr><tr><th>User Nickname</th><td>User</td></tr></tbody></table><div class="return-to-top"><a href
 ="#top"><span aria-hidden="true">&uarr; </span> Go to top</a></div></div>',
</ins><span class="cx" style="display: block; padding: 0 10px">                                         'json' => ',"user":{"group_label":"User","group_description":"User&#8217;s profile data.","items":{"user-1":[{"name":"User ID","value":1},{"name":"User Login Name","value":"user_login"},{"name":"User Nice Name","value":"User Name"},{"name":"User Email","value":"export-requester@example.com"},{"name":"User Registration Date","value":"2020-01-31 19:29:29"},{"name":"User Display Name","value":"User Name"},{"name":"User Nickname","value":"User"}]}}',
</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">@@ -623,7 +623,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">                                'expected_content' => array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'html' => '<div id="table_of_contents"><h2>Table of Contents</h2><ul><li><a href="#about-about">About</a></li><li><a href="#user-user">User</a></li><li><a href="#comments-comments">Comments <span class="count">(2)</span></a></li></ul></div><h2 id="about-about">About</h2><p>Overview of export report.</p><div><table><tbody><tr><th>Report generated for</th><td>export-requester@example.com</td></tr><tr><th>For site</th><td>Test Blog</td></tr><tr><th>At URL</th><td><a href="http://example.org">http://example.org</a></td></tr><tr><
 th>On</th><td>{{TIMESTAMP}}</td></tr></tbody></table><div class="return-to-top"><a href="#top"><span aria-hidden="true">&uarr; </span> Go to top</a></div></div><h2 id="user-user">User</h2><p>User&#8217;s profile data.</p><div><table><tbody><tr><th>User ID</th><td>1</td></tr><tr><th>User Login Name</th><td>user_login</td></tr><tr><th>User Nice Name</th><td>User Name</td></tr><tr><th>User Email</th><td>export-requester@example.com</td></tr><tr><th>User Registration Date</th><td>2020-01-31 19:29:29</td></tr><tr><th>User Display Name</th><td>User Name</td></tr><tr><th>User Nickname</th>&lt
 ;td>User</td></tr></tbody></table><div class="return-to-top"><a href="#top"><span aria-hidden="true">&uarr; </span> Go to top</a></div></div><h2 id="comments-comments">Comments <span class="count">(2)</span></h2><p>User&#8217;s comment data.</p><div><table><tbody><tr><th>Comment Author</th><td>User Name</td></tr><tr><th>Comment Author Email</th><td>export-requester@example.com</td></tr><tr><th>Comment Author IP</th><td>::1</td></tr><tr><th>Comment Author User Agent</th><td>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36</td></tr><tr><th>Comment Date</th><td>2020-01-31
  19:55:19</td></tr><tr><th>Comment Content</th><td>Test</td></tr><tr><th>Comment URL</th><td><a href="http://localhost:8888/46894/2020/01/31/hello-world/#comment-2">http://localhost:8888/46894/2020/01/31/hello-world/#comment-2</a></td></tr></tbody></table><table><tbody><tr><th>Comment Author</th><td>User Name</td></tr><tr><th>Comment Author Email</th><td>export-requester@example.com</td></tr><tr><th>Comment Author IP</th><td>::1</td></tr><tr><th>Comment Author User Agent</th><td>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36</td></tr><tr><th>Comment Date</th><td>2020-01-31 20:55:19</td></tr><tr><
 th>Comment Content</th><td>Test #2</td></tr><tr><th>Comment URL</th><td><a href="http://localhost:8888/46894/2020/01/31/hello-world/#comment-3">http://localhost:8888/46894/2020/01/31/hello-world/#comment-3</a></td></tr></tbody></table><div class="return-to-top"><a href="#top"><span aria-hidden="true">&uarr; </span> Go to top</a></div></div>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 'html' => '<div id="table_of_contents"><h2>Table of Contents</h2><ul><li><a href="#about-about">About</a></li><li><a href="#user-user">User</a></li><li><a href="#comments-comments">Comments <span class="count">(2)</span></a></li></ul></div><h2 id="about-about">About</h2><p>Overview of export report.</p><div><table><tbody><tr><th>Report generated for</th><td>export-requester@example.com</td></tr><tr><th>For site</th><td>Test Blog</td></tr><tr><th>At URL</th><td><a href="http://' . WP_TESTS_DOMAIN . '">http://' . WP_TESTS_DOMAIN . '</a></td>&l
 t;/tr><tr><th>On</th><td>{{TIMESTAMP}}</td></tr></tbody></table><div class="return-to-top"><a href="#top"><span aria-hidden="true">&uarr; </span> Go to top</a></div></div><h2 id="user-user">User</h2><p>User&#8217;s profile data.</p><div><table><tbody><tr><th>User ID</th><td>1</td></tr><tr><th>User Login Name</th><td>user_login</td></tr><tr><th>User Nice Name</th><td>User Name</td></tr><tr><th>User Email</th><td>export-requester@example.com</td></tr><tr><th>User Registration Date</th><td>2020-01-31 19:29:29</td></tr><tr><th>User Display Name</th><td>User Name</td></tr><tr><th>User
  Nickname</th><td>User</td></tr></tbody></table><div class="return-to-top"><a href="#top"><span aria-hidden="true">&uarr; </span> Go to top</a></div></div><h2 id="comments-comments">Comments <span class="count">(2)</span></h2><p>User&#8217;s comment data.</p><div><table><tbody><tr><th>Comment Author</th><td>User Name</td></tr><tr><th>Comment Author Email</th><td>export-requester@example.com</td></tr><tr><th>Comment Author IP</th><td>::1</td></tr><tr><th>Comment Author User Agent</th><td>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36</td></tr><tr><th>Comment Date</th&
 gt;<td>2020-01-31 19:55:19</td></tr><tr><th>Comment Content</th><td>Test</td></tr><tr><th>Comment URL</th><td><a href="http://localhost:8888/46894/2020/01/31/hello-world/#comment-2">http://localhost:8888/46894/2020/01/31/hello-world/#comment-2</a></td></tr></tbody></table><table><tbody><tr><th>Comment Author</th><td>User Name</td></tr><tr><th>Comment Author Email</th><td>export-requester@example.com</td></tr><tr><th>Comment Author IP</th><td>::1</td></tr><tr><th>Comment Author User Agent</th><td>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36</td></tr><tr><th>Comment Date</th><td>2020-01-31 20:55:19</td>&l
 t;/tr><tr><th>Comment Content</th><td>Test #2</td></tr><tr><th>Comment URL</th><td><a href="http://localhost:8888/46894/2020/01/31/hello-world/#comment-3">http://localhost:8888/46894/2020/01/31/hello-world/#comment-3</a></td></tr></tbody></table><div class="return-to-top"><a href="#top"><span aria-hidden="true">&uarr; </span> Go to top</a></div></div>',
</ins><span class="cx" style="display: block; padding: 0 10px">                                         'json' => ',"user":{"group_label":"User","group_description":"User&#8217;s profile data.","items":{"user-1":[{"name":"User ID","value":1},{"name":"User Login Name","value":"user_login"},{"name":"User Nice Name","value":"User Name"},{"name":"User Email","value":"export-requester@example.com"},{"name":"User Registration Date","value":"2020-01-31 19:29:29"},{"name":"User Display Name","value":"User Name"},{"name":"User Nickname","value":"User"}]}},"comments":{"group_label":"Comments","group_description":"User&#8217;s comment data.
 ","items":{"comment-2":[{"name":"Comment Author","value":"User Name"},{"name":"Comment Author Email","value":"export-requester@example.com"},{"name":"Comment Author IP","value":"::1"},{"name":"Comment Author User Agent","value":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/79.0.3945.130 Safari\/537.36"},{"name":"Comment Date","value":"2020-01-31 19:55:19"},{"name":"Comment Content","value":"Test"},{"name":"Comment URL","value":"<a href=\"http:\/\/localhost:8888\/46894\/2020\/01\/31\/hello-world\/#comment-2\" target=\"_blank\" rel=\"noopener\">http:\/\/localhost:8888\/46894\/2020\/01\/31\/hello-world\/#
 comment-2<\/a>"}],"comment-3":[{"name":"Comment Author","value":"User Name"},{"name":"Comment Author Email","value":"export-requester@example.com"},{"name":"Comment Author IP","value":"::1"},{"name":"Comment Author User Agent","value":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/79.0.3945.130 Safari\/537.36"},{"name":"Comment Date","value":"2020-01-31 20:55:19"},{"name":"Comment Content","value":"Test #2"},{"name":"Comment URL","value":"<a href=\"http:\/\/localhost:8888\/46894\/2020\/01\/31\/hello-world\/#comment-3\" target=\"_blank\" rel=\"noopener\">http:\/\/localhost:8888\/46894\/2020\/01\/31\/hello-wo
 rld\/#comment-3<\/a>"}]}}',
</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="trunktestsphpunittestsrestapirestschemasetupphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php  2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php    2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -210,6 +210,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">        public function test_build_wp_api_client_fixtures() {
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                if ( 'example.org' !== WP_TESTS_DOMAIN ) {
+                       $this->markTestSkipped( 'This test can only be run on example.org' );
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 // Set up data for individual endpoint responses.  We need to specify
</span><span class="cx" style="display: block; padding: 0 10px">                // lots of different fields on these objects, otherwise the generated
</span><span class="cx" style="display: block; padding: 0 10px">                // fixture file will be different between runs of PHPUnit tests, which
</span></span></pre></div>
<a id="trunktestsphpunittestsrestapirestwidgetscontrollerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/rest-api/rest-widgets-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/rest-api/rest-widgets-controller.php    2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/rest-api/rest-widgets-controller.php      2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -391,7 +391,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id'       => 'rss-1',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id_base'  => 'rss',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'sidebar'  => 'sidebar-1',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'rendered' => '<a class="rsswidget rss-widget-feed" href="https://wordpress.org/news/feed"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="http://example.org/wp-includes/images/rss.png" alt="RSS" loading="lazy" /></a> <a class="rsswidget rss-widget-title" href="https://wordpress.org/news">RSS test</a><ul><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/introducing-learn-wordpress/\'>Introducing Learn WordPress</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/simone/\'>WordPress 5.6 “Simone”</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/state-of-the-word-2020/\'>State of 
 the Word 2020</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/the-month-in-wordpress-november-2020/\'>The Month in WordPress: November 2020</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/wordpress-5-6-release-candidate-2/\'>WordPress 5.6 Release Candidate 2</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/11/wordpress-5-6-release-candidate/\'>WordPress 5.6 Release Candidate</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/11/wordpress-5-6-beta-4/\'>WordPress 5.6 Beta 4</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/11/wordpress-5-6-beta-3/\'>WordPress 5.6 Beta 3</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/11/the-month-in-wordpress-october-2020/\'>The Month in WordPress: October 
 2020</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/10/wordpress-5-5-3-maintenance-release/\'>WordPress 5.5.3 Maintenance Release</a></li></ul>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 'rendered' => '<a class="rsswidget rss-widget-feed" href="https://wordpress.org/news/feed"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="http://' . WP_TESTS_DOMAIN . '/wp-includes/images/rss.png" alt="RSS" loading="lazy" /></a> <a class="rsswidget rss-widget-title" href="https://wordpress.org/news">RSS test</a><ul><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/introducing-learn-wordpress/\'>Introducing Learn WordPress</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/simone/\'>WordPress 5.6 “Simone”</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/state-of-the-word-2020/\'&g
 t;State of the Word 2020</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/the-month-in-wordpress-november-2020/\'>The Month in WordPress: November 2020</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/12/wordpress-5-6-release-candidate-2/\'>WordPress 5.6 Release Candidate 2</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/11/wordpress-5-6-release-candidate/\'>WordPress 5.6 Release Candidate</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/11/wordpress-5-6-beta-4/\'>WordPress 5.6 Beta 4</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/11/wordpress-5-6-beta-3/\'>WordPress 5.6 Beta 3</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/11/the-month-in-wordpress-october-2020/\'>The Month in WordPres
 s: October 2020</a></li><li><a class=\'rsswidget\' href=\'https://wordpress.org/news/2020/10/wordpress-5-5-3-maintenance-release/\'>WordPress 5.5.3 Maintenance Release</a></li></ul>',
</ins><span class="cx" style="display: block; padding: 0 10px">                                 ),
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'id'       => 'testwidget',
</span></span></pre></div>
<a id="trunktestsphpunittestsuserwpListAuthorsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/user/wpListAuthors.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/user/wpListAuthors.php  2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/user/wpListAuthors.php    2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -279,7 +279,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        wp_list_authors(
</span><span class="cx" style="display: block; padding: 0 10px">                                array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'echo'       => false,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        'feed_image' => WP_TESTS_DOMAIN . '/path/to/a/graphic.png',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 'feed_image' => 'http://' . WP_TESTS_DOMAIN . '/path/to/a/graphic.png',
</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">                );
</span></span></pre></div>
<a id="trunktestsphpunittestsuserwpListUsersphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/tests/user/wpListUsers.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/tests/user/wpListUsers.php    2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tests/phpunit/tests/user/wpListUsers.php      2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -119,10 +119,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                'args'     => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                        'feed' => 'User feed',
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected' => '<li>jane (<a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_jane">User feed</a>)</li>' .
-                                               '<li>michelle (<a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_michelle">User feed</a>)</li>' .
-                                               '<li>paul (<a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_paul">User feed</a>)</li>' .
-                                               '<li>zack (<a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_zack">User feed</a>)</li>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected' => '<li>jane (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_jane">User feed</a>)</li>' .
+                                               '<li>michelle (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_michelle">User feed</a>)</li>' .
+                                               '<li>paul (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_paul">User feed</a>)</li>' .
+                                               '<li>zack (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_zack">User feed</a>)</li>',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'the feed of each user and an image' => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'args'     => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -129,10 +129,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        'feed'       => 'User feed with image',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'feed_image' => 'http://example.org/image.jpg',
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected' => '<li>jane <a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_jane"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>' .
-                                               '<li>michelle <a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_michelle"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>' .
-                                               '<li>paul <a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_paul"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>' .
-                                               '<li>zack <a href="http://example.org/?feed=rss2&amp;author=AUTHOR_ID_zack"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected' => '<li>jane <a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_jane"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>' .
+                                               '<li>michelle <a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_michelle"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>' .
+                                               '<li>paul <a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_paul"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>' .
+                                               '<li>zack <a href="http://' . WP_TESTS_DOMAIN . '/?feed=rss2&amp;author=AUTHOR_ID_zack"><img src="http://example.org/image.jpg" style="border: none;" alt="User feed with image" /></a></li>',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'a feed of the specified type'       => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'args'     => array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -139,10 +139,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        'feed'      => 'User feed as atom',
</span><span class="cx" style="display: block; padding: 0 10px">                                        'feed_type' => 'atom',
</span><span class="cx" style="display: block; padding: 0 10px">                                ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                'expected' => '<li>jane (<a href="http://example.org/?feed=atom&amp;author=AUTHOR_ID_jane">User feed as atom</a>)</li>' .
-                                               '<li>michelle (<a href="http://example.org/?feed=atom&amp;author=AUTHOR_ID_michelle">User feed as atom</a>)</li>' .
-                                               '<li>paul (<a href="http://example.org/?feed=atom&amp;author=AUTHOR_ID_paul">User feed as atom</a>)</li>' .
-                                               '<li>zack (<a href="http://example.org/?feed=atom&amp;author=AUTHOR_ID_zack">User feed as atom</a>)</li>',
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         'expected' => '<li>jane (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=atom&amp;author=AUTHOR_ID_jane">User feed as atom</a>)</li>' .
+                                               '<li>michelle (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=atom&amp;author=AUTHOR_ID_michelle">User feed as atom</a>)</li>' .
+                                               '<li>paul (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=atom&amp;author=AUTHOR_ID_paul">User feed as atom</a>)</li>' .
+                                               '<li>zack (<a href="http://' . WP_TESTS_DOMAIN . '/?feed=atom&amp;author=AUTHOR_ID_zack">User feed as atom</a>)</li>',
</ins><span class="cx" style="display: block; padding: 0 10px">                         ),
</span><span class="cx" style="display: block; padding: 0 10px">                        'no output via echo'                 => array(
</span><span class="cx" style="display: block; padding: 0 10px">                                'args'     => array(
</span></span></pre></div>
<a id="trunktoolslocalenvdefaulttemplate"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tools/local-env/default.template</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tools/local-env/default.template    2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tools/local-env/default.template      2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,6 +15,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        absolute_redirect off;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        if (!-e $request_filename) {
+               rewrite /wp-admin$ $scheme://$host$request_uri/ permanent;
+               rewrite ^(/[^/]+)?(/wp-.*) $2 last;
+               rewrite ^(/[^/]+)?(/.*\.php) $2 last;
+       }
+
</ins><span class="cx" style="display: block; padding: 0 10px">         location / {
</span><span class="cx" style="display: block; padding: 0 10px">                try_files $uri $uri/ /index.php?$args;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span></span></pre></div>
<a id="trunktoolslocalenvscriptsinstalljs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tools/local-env/scripts/install.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tools/local-env/scripts/install.js  2024-05-04 19:09:57 UTC (rev 58096)
+++ trunk/tools/local-env/scripts/install.js    2024-05-04 19:23:31 UTC (rev 58097)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -29,6 +29,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">        .replace( 'yourusernamehere', 'root' )
</span><span class="cx" style="display: block; padding: 0 10px">        .replace( 'yourpasswordhere', 'password' )
</span><span class="cx" style="display: block; padding: 0 10px">        .replace( 'localhost', 'mysql' )
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+        .replace( "'WP_TESTS_DOMAIN', 'example.org'", `'WP_TESTS_DOMAIN', '${process.env.LOCAL_WP_TESTS_DOMAIN}'` )
</ins><span class="cx" style="display: block; padding: 0 10px">         .concat( "\ndefine( 'FS_METHOD', 'direct' );\n" );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> writeFileSync( 'wp-tests-config.php', testConfig );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,7 +38,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wait_on( { resources: [ `tcp:localhost:${process.env.LOCAL_PORT}`] } )
</span><span class="cx" style="display: block; padding: 0 10px">        .then( () => {
</span><span class="cx" style="display: block; padding: 0 10px">                wp_cli( 'db reset --yes' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                wp_cli( `core install --title="WordPress Develop" --admin_user=admin --admin_password=password --admin_email=test@test.com --skip-email --url=http://localhost:${process.env.LOCAL_PORT}` );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         const installCommand = process.env.LOCAL_MULTISITE === 'true'  ? 'multisite-install' : 'install';
+               wp_cli( `core ${ installCommand } --title="WordPress Develop" --admin_user=admin --admin_password=password --admin_email=test@test.com --skip-email --url=http://localhost:${process.env.LOCAL_PORT}` );
</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"> /**
</span></span></pre>
</div>
</div>

</body>
</html>