<!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>[55703] trunk/src: Code Modernization: Replace usage of `strpos()` with `str_starts_with()`.</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/55703">55703</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/55703","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>SergeyBiryukov</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2023-05-02 15:43:03 +0000 (Tue, 02 May 2023)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Code Modernization: Replace usage of `strpos()` with `str_starts_with()`.
`str_starts_with()` was introduced in PHP 8.0 to perform a case-sensitive check indicating if the string to search in (haystack) begins with the given substring (needle).
WordPress core includes a polyfill for `str_starts_with()` on PHP < 8.0 as of WordPress 5.9.
This commit replaces `0 === strpos( ... )` with `str_starts_with()` in core files, making the code more readable and consistent, as well as improving performance.
While `strpos()` is slightly faster than the polyfill on PHP < 8.0, `str_starts_with()` is noticeably faster on PHP 8.0+, as it is optimized to avoid unnecessarily searching along the whole haystack if it does not find the needle.
Follow-up to <a href="https://core.trac.wordpress.org/changeset/52039">[52039]</a>, <a href="https://core.trac.wordpress.org/changeset/52040">[52040]</a>, <a href="https://core.trac.wordpress.org/changeset/52326">[52326]</a>.
Props spacedmonkey, costdev, sabernhardt, mukesh27, desrosj, jorbin, TobiasBg, ayeshrajans, lgadzhev, SergeyBiryukov.
Fixes <a href="https://core.trac.wordpress.org/ticket/58012">#58012</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesajaxactionsphp">trunk/src/wp-admin/includes/ajax-actions.php</a></li>
<li><a href="#trunksrcwpadminincludesclassfileuploadupgraderphp">trunk/src/wp-admin/includes/class-file-upload-upgrader.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpmedialisttablephp">trunk/src/wp-admin/includes/class-wp-media-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswppostslisttablephp">trunk/src/wp-admin/includes/class-wp-posts-list-table.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpprivacypolicycontentphp">trunk/src/wp-admin/includes/class-wp-privacy-policy-content.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpsitehealthphp">trunk/src/wp-admin/includes/class-wp-site-health.php</a></li>
<li><a href="#trunksrcwpadminincludescreditsphp">trunk/src/wp-admin/includes/credits.php</a></li>
<li><a href="#trunksrcwpadminincludesfilephp">trunk/src/wp-admin/includes/file.php</a></li>
<li><a href="#trunksrcwpadminincludesmediaphp">trunk/src/wp-admin/includes/media.php</a></li>
<li><a href="#trunksrcwpadminincludesmenuphp">trunk/src/wp-admin/includes/menu.php</a></li>
<li><a href="#trunksrcwpadminincludesnetworkphp">trunk/src/wp-admin/includes/network.php</a></li>
<li><a href="#trunksrcwpadminincludespostphp">trunk/src/wp-admin/includes/post.php</a></li>
<li><a href="#trunksrcwpadminincludesprivacytoolsphp">trunk/src/wp-admin/includes/privacy-tools.php</a></li>
<li><a href="#trunksrcwpadminincludestemplatephp">trunk/src/wp-admin/includes/template.php</a></li>
<li><a href="#trunksrcwpadminincludesupdatecorephp">trunk/src/wp-admin/includes/update-core.php</a></li>
<li><a href="#trunksrcwpadminloadstylesphp">trunk/src/wp-admin/load-styles.php</a></li>
<li><a href="#trunksrcwpadminmenuheaderphp">trunk/src/wp-admin/menu-header.php</a></li>
<li><a href="#trunksrcwpadminmenuphp">trunk/src/wp-admin/menu.php</a></li>
<li><a href="#trunksrcwpadminoptionspermalinkphp">trunk/src/wp-admin/options-permalink.php</a></li>
<li><a href="#trunksrcwpincludesblocktemplatephp">trunk/src/wp-includes/block-template.php</a></li>
<li><a href="#trunksrcwpincludesblocksphp">trunk/src/wp-includes/blocks.php</a></li>
<li><a href="#trunksrcwpincludesbookmarktemplatephp">trunk/src/wp-includes/bookmark-template.php</a></li>
<li><a href="#trunksrcwpincludesclasssimplepiephp">trunk/src/wp-includes/class-simplepie.php</a></li>
<li><a href="#trunksrcwpincludesclasswpcustomizemanagerphp">trunk/src/wp-includes/class-wp-customize-manager.php</a></li>
<li><a href="#trunksrcwpincludesclasswpcustomizewidgetsphp">trunk/src/wp-includes/class-wp-customize-widgets.php</a></li>
<li><a href="#trunksrcwpincludesclasswpqueryphp">trunk/src/wp-includes/class-wp-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswprecoverymodeemailservicephp">trunk/src/wp-includes/class-wp-recovery-mode-email-service.php</a></li>
<li><a href="#trunksrcwpincludesclasswprecoverymodephp">trunk/src/wp-includes/class-wp-recovery-mode.php</a></li>
<li><a href="#trunksrcwpincludesclasswpscriptsphp">trunk/src/wp-includes/class-wp-scripts.php</a></li>
<li><a href="#trunksrcwpincludesclasswpstylesphp">trunk/src/wp-includes/class-wp-styles.php</a></li>
<li><a href="#trunksrcwpincludesclasswpthemephp">trunk/src/wp-includes/class-wp-theme.php</a></li>
<li><a href="#trunksrcwpincludesclasswpphp">trunk/src/wp-includes/class-wp.php</a></li>
<li><a href="#trunksrcwpincludescommentphp">trunk/src/wp-includes/comment.php</a></li>
<li><a href="#trunksrcwpincludeserrorprotectionphp">trunk/src/wp-includes/error-protection.php</a></li>
<li><a href="#trunksrcwpincludesfunctionsphp">trunk/src/wp-includes/functions.php</a></li>
<li><a href="#trunksrcwpincludesgeneraltemplatephp">trunk/src/wp-includes/general-template.php</a></li>
<li><a href="#trunksrcwpincludesksesphp">trunk/src/wp-includes/kses.php</a></li>
<li><a href="#trunksrcwpincludesl10nphp">trunk/src/wp-includes/l10n.php</a></li>
<li><a href="#trunksrcwpincludeslinktemplatephp">trunk/src/wp-includes/link-template.php</a></li>
<li><a href="#trunksrcwpincludesmediaphp">trunk/src/wp-includes/media.php</a></li>
<li><a href="#trunksrcwpincludespluggablephp">trunk/src/wp-includes/pluggable.php</a></li>
<li><a href="#trunksrcwpincludespluginphp">trunk/src/wp-includes/plugin.php</a></li>
<li><a href="#trunksrcwpincludesposttemplatephp">trunk/src/wp-includes/post-template.php</a></li>
<li><a href="#trunksrcwpincludespostphp">trunk/src/wp-includes/post.php</a></li>
<li><a href="#trunksrcwpincludesrestapiclasswprestrequestphp">trunk/src/wp-includes/rest-api/class-wp-rest-request.php</a></li>
<li><a href="#trunksrcwpincludesrestapiclasswprestserverphp">trunk/src/wp-includes/rest-api/class-wp-rest-server.php</a></li>
<li><a href="#trunksrcwpincludesrestapiphp">trunk/src/wp-includes/rest-api.php</a></li>
<li><a href="#trunksrcwpincludesrewritephp">trunk/src/wp-includes/rewrite.php</a></li>
<li><a href="#trunksrcwpincludesscriptloaderphp">trunk/src/wp-includes/script-loader.php</a></li>
<li><a href="#trunksrcwpincludestaxonomyphp">trunk/src/wp-includes/taxonomy.php</a></li>
<li><a href="#trunksrcwpincludesthemephp">trunk/src/wp-includes/theme.php</a></li>
<li><a href="#trunksrcwpincludesuserphp">trunk/src/wp-includes/user.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsclasswpwidgetblockphp">trunk/src/wp-includes/widgets/class-wp-widget-block.php</a></li>
<li><a href="#trunksrcwploginphp">trunk/src/wp-login.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesajaxactionsphp"></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/ajax-actions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/ajax-actions.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/ajax-actions.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3749,7 +3749,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_embed->usecache = false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( is_ssl() && 0 === strpos( $url, 'http://' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( is_ssl() && str_starts_with( $url, 'http://' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Admin is ssl and the user pasted non-ssl URL.
</span><span class="cx" style="display: block; padding: 0 10px"> // Check if the provider supports ssl embeds and use that for the preview.
</span><span class="cx" style="display: block; padding: 0 10px"> $ssl_shortcode = preg_replace( '%^(\\[embed[^\\]]*\\])http://%i', '$1https://', $shortcode );
</span></span></pre></div>
<a id="trunksrcwpadminincludesclassfileuploadupgraderphp"></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/class-file-upload-upgrader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-file-upload-upgrader.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/class-file-upload-upgrader.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -108,7 +108,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->filename = sanitize_file_name( $_GET[ $urlholder ] );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->package = $uploads['basedir'] . '/' . $this->filename;
</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 ( 0 !== strpos( realpath( $this->package ), realpath( $uploads['basedir'] ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! str_starts_with( realpath( $this->package ), realpath( $uploads['basedir'] ) ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_die( __( 'Please select a file' ) );
</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="trunksrcwpadminincludesclasswpmedialisttablephp"></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/class-wp-media-list-table.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-media-list-table.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/class-wp-media-list-table.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -140,7 +140,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"> $selected = selected(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $filter && 0 === strpos( $filter, 'post_mime_type:' ) &&
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $filter && str_starts_with( $filter, 'post_mime_type:' ) &&
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_match_mime_types( $mime_type, str_replace( 'post_mime_type:', '', $filter ) ),
</span><span class="cx" style="display: block; padding: 0 10px"> true,
</span><span class="cx" style="display: block; padding: 0 10px"> false
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -652,7 +652,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $taxonomy = 'category';
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( 'tags' === $column_name ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $taxonomy = 'post_tag';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 0 === strpos( $column_name, 'taxonomy-' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( str_starts_with( $column_name, 'taxonomy-' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $taxonomy = substr( $column_name, 9 );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $taxonomy = false;
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswppostslisttablephp"></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/class-wp-posts-list-table.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-posts-list-table.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/class-wp-posts-list-table.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1271,7 +1271,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $taxonomy = 'category';
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( 'tags' === $column_name ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $taxonomy = 'post_tag';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 0 === strpos( $column_name, 'taxonomy-' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( str_starts_with( $column_name, 'taxonomy-' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $taxonomy = substr( $column_name, 9 );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $taxonomy = false;
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpprivacypolicycontentphp"></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/class-wp-privacy-policy-content.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-privacy-policy-content.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/class-wp-privacy-policy-content.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -656,11 +656,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $blocks ) {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $strings as $key => $string ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $string, '<p>' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $string, '<p>' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $strings[ $key ] = '<!-- wp:paragraph -->' . $string . '<!-- /wp:paragraph -->';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $string, '<h2>' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $string, '<h2>' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $strings[ $key ] = '<!-- wp:heading -->' . $string . '<!-- /wp:heading -->';
</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="trunksrcwpadminincludesclasswpsitehealthphp"></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/class-wp-site-health.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-site-health.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/class-wp-site-health.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1508,7 +1508,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $result['label'] = __( 'Your site is set to log errors to a potentially public file' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $result['status'] = ( 0 === strpos( ini_get( 'error_log' ), ABSPATH ) ) ? 'critical' : 'recommended';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $result['status'] = str_starts_with( ini_get( 'error_log' ), ABSPATH ) ? 'critical' : 'recommended';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $result['description'] .= sprintf(
</span><span class="cx" style="display: block; padding: 0 10px"> '<p>%s</p>',
</span></span></pre></div>
<a id="trunksrcwpadminincludescreditsphp"></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/credits.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/credits.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/credits.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,7 +33,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_array( $results )
</span><span class="cx" style="display: block; padding: 0 10px"> || false !== strpos( $version, '-' )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- || ( isset( $results['data']['version'] ) && strpos( $version, $results['data']['version'] ) !== 0 )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ || ( isset( $results['data']['version'] ) && ! str_starts_with( $version, $results['data']['version'] ) )
</ins><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $url = "http://api.wordpress.org/core/credits/1.1/?version={$version}&locale={$locale}";
</span><span class="cx" style="display: block; padding: 0 10px"> $options = array( 'user-agent' => 'WordPress/' . $version . '; ' . home_url( '/' ) );
</span></span></pre></div>
<a id="trunksrcwpadminincludesfilephp"></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/file.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/file.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/file.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -997,7 +997,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( false === $move_new_file ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $uploads['basedir'], ABSPATH ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $uploads['basedir'], ABSPATH ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $error_path = str_replace( ABSPATH, '', $uploads['basedir'] ) . $uploads['subdir'];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $error_path = basename( $uploads['basedir'] ) . $uploads['subdir'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1196,7 +1196,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $content_disposition ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $content_disposition = strtolower( $content_disposition );
</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 ( 0 === strpos( $content_disposition, 'attachment; filename=' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $content_disposition, 'attachment; filename=' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $tmpfname_disposition = sanitize_file_name( substr( $content_disposition, 21 ) );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $tmpfname_disposition = '';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1937,7 +1937,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $sub_skip_list = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $skip_list as $skip_item ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $skip_item, $filename . '/' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $skip_item, $filename . '/' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $sub_skip_list[] = preg_replace( '!^' . preg_quote( $filename, '!' ) . '/!i', '', $skip_item );
</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="trunksrcwpadminincludesmediaphp"></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/media.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/media.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/media.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -385,7 +385,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"> // Use image exif/iptc data for title and caption defaults if possible.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 0 === strpos( $type, 'image/' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( str_starts_with( $type, 'image/' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $image_meta = wp_read_image_metadata( $file );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $image_meta ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -534,8 +534,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_enqueue_style( 'colors' );
</span><span class="cx" style="display: block; padding: 0 10px"> // Check callback name for 'media'.
</span><span class="cx" style="display: block; padding: 0 10px"> if (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ( is_array( $content_func ) && ! empty( $content_func[1] ) && 0 === strpos( (string) $content_func[1], 'media' ) ) ||
- ( ! is_array( $content_func ) && 0 === strpos( $content_func, 'media' ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ( is_array( $content_func ) && ! empty( $content_func[1] ) && str_starts_with( (string) $content_func[1], 'media' ) ) ||
+ ( ! is_array( $content_func ) && str_starts_with( $content_func, 'media' ) )
</ins><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_enqueue_style( 'deprecated-media' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3507,7 +3507,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'length' !== $key && ! empty( $list ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $metadata[ $key ] = wp_kses_post( reset( $list ) );
</span><span class="cx" style="display: block; padding: 0 10px"> // Fix bug in byte stream analysis.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'terms_of_use' === $key && 0 === strpos( $metadata[ $key ], 'yright notice.' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'terms_of_use' === $key && str_starts_with( $metadata[ $key ], 'yright notice.' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $metadata[ $key ] = 'Cop' . $metadata[ $key ];
</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="trunksrcwpadminincludesmenuphp"></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/menu.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/menu.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/menu.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -228,7 +228,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $top[2], 'separator' ) && false !== $last_order ) { // If separator.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $top[2], 'separator' ) && false !== $last_order ) { // If separator.
</ins><span class="cx" style="display: block; padding: 0 10px"> $first_item = true;
</span><span class="cx" style="display: block; padding: 0 10px"> $classes = $menu[ $last_order ][4];
</span><span class="cx" style="display: block; padding: 0 10px"> $menu[ $last_order ][4] = add_cssclass( 'menu-top-last', $classes );
</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 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/network.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -263,7 +263,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> echo '<div class="error inline"><p><strong>' . __( 'Warning:' ) . '</strong> ' . __( 'Subdirectory networks may not be fully compatible with custom wp-content directories.' ) . '</p></div>';
</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">- $is_www = ( 0 === strpos( $hostname, 'www.' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $is_www = str_starts_with( $hostname, 'www.' );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $is_www ) :
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <h3><?php esc_html_e( 'Server Address' ); ?></h3>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -394,7 +394,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $base = parse_url( $slashed_home, PHP_URL_PATH );
</span><span class="cx" style="display: block; padding: 0 10px"> $document_root_fix = str_replace( '\\', '/', realpath( $_SERVER['DOCUMENT_ROOT'] ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $abspath_fix = str_replace( '\\', '/', ABSPATH );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $home_path = 0 === strpos( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : get_home_path();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $home_path = str_starts_with( $abspath_fix, $document_root_fix ) ? $document_root_fix . $base : get_home_path();
</ins><span class="cx" style="display: block; padding: 0 10px"> $wp_siteurl_subdir = preg_replace( '#^' . preg_quote( $home_path, '#' ) . '#', '', $abspath_fix );
</span><span class="cx" style="display: block; padding: 0 10px"> $rewrite_base = ! empty( $wp_siteurl_subdir ) ? ltrim( trailingslashit( $wp_siteurl_subdir ), '/' ) : '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpadminincludespostphp"></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/post.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/post.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/post.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2438,7 +2438,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $classic_elements = wp_html_split( $classic_output );
</span><span class="cx" style="display: block; padding: 0 10px"> $hidden_inputs = '';
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $classic_elements as $element ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 !== strpos( $element, '<input ' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! str_starts_with( $element, '<input ' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpadminincludesprivacytoolsphp"></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/privacy-tools.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/privacy-tools.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/privacy-tools.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -275,7 +275,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( (array) $group_item_data as $group_item_datum ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $value = $group_item_datum['value'];
</span><span class="cx" style="display: block; padding: 0 10px"> // If it looks like a link, make it a link.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( false === strpos( $value, ' ' ) && ( 0 === strpos( $value, 'http://' ) || 0 === strpos( $value, 'https://' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( false === strpos( $value, ' ' ) && ( str_starts_with( $value, 'http://' ) || str_starts_with( $value, 'https://' ) ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $value = '<a href="' . esc_url( $value ) . '">' . esc_html( $value ) . '</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="trunksrcwpadminincludestemplatephp"></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/template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/template.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/template.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1257,7 +1257,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $filename = wp_normalize_path( $reflection->getFileName() );
</span><span class="cx" style="display: block; padding: 0 10px"> $plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
</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 ( strpos( $filename, $plugin_dir ) === 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $filename, $plugin_dir ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $filename = str_replace( $plugin_dir, '', $filename );
</span><span class="cx" style="display: block; padding: 0 10px"> $filename = preg_replace( '|^/([^/]*/).*$|', '\\1', $filename );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1264,7 +1264,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $plugins = get_plugins();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $plugins as $name => $plugin ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( strpos( $name, $filename ) === 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $name, $filename ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $plugin;
</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="trunksrcwpadminincludesupdatecorephp"></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/update-core.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/update-core.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/includes/update-core.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1411,7 +1411,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"> // Check if the language directory exists first.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! @is_dir( $lang_dir ) && 0 === strpos( $lang_dir, ABSPATH ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! @is_dir( $lang_dir ) && str_starts_with( $lang_dir, ABSPATH ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // If it's within the ABSPATH we can handle it here, otherwise they're out of luck.
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_filesystem->mkdir( $to . str_replace( ABSPATH, '', $lang_dir ), FS_CHMOD_DIR );
</span><span class="cx" style="display: block; padding: 0 10px"> clearstatcache(); // For FTP, need to clear the stat cache.
</span></span></pre></div>
<a id="trunksrcwpadminloadstylesphp"></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/load-styles.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/load-styles.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/load-styles.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -73,7 +73,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $content = get_file( $path ) . "\n";
</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 ( strpos( $style->src, '/' . WPINC . '/css/' ) === 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $style->src, '/' . WPINC . '/css/' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $content = str_replace( '../images/', '../' . WPINC . '/images/', $content );
</span><span class="cx" style="display: block; padding: 0 10px"> $content = str_replace( '../js/tinymce/', '../' . WPINC . '/js/tinymce/', $content );
</span><span class="cx" style="display: block; padding: 0 10px"> $content = str_replace( '../fonts/', '../' . WPINC . '/fonts/', $content );
</span></span></pre></div>
<a id="trunksrcwpadminmenuheaderphp"></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/menu-header.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/menu-header.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/menu-header.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -127,12 +127,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'none' === $item[6] || 'div' === $item[6] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $img = '<br />';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 0 === strpos( $item[6], 'data:image/svg+xml;base64,' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( str_starts_with( $item[6], 'data:image/svg+xml;base64,' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $img = '<br />';
</span><span class="cx" style="display: block; padding: 0 10px"> // The value is base64-encoded data, so esc_attr() is used here instead of esc_url().
</span><span class="cx" style="display: block; padding: 0 10px"> $img_style = ' style="background-image:url(\'' . esc_attr( $item[6] ) . '\')"';
</span><span class="cx" style="display: block; padding: 0 10px"> $img_class = ' svg';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 0 === strpos( $item[6], 'dashicons-' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( str_starts_with( $item[6], 'dashicons-' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $img = '<br />';
</span><span class="cx" style="display: block; padding: 0 10px"> $img_class = ' dashicons-before ' . sanitize_html_class( $item[6] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadminmenuphp"></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/menu.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/menu.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/menu.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -130,7 +130,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $menu_icon = 'dashicons-admin-post';
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_string( $ptype_obj->menu_icon ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Special handling for data:image/svg+xml and Dashicons.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $ptype_obj->menu_icon, 'data:image/svg+xml;base64,' ) || 0 === strpos( $ptype_obj->menu_icon, 'dashicons-' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $ptype_obj->menu_icon, 'data:image/svg+xml;base64,' ) || str_starts_with( $ptype_obj->menu_icon, 'dashicons-' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $menu_icon = $ptype_obj->menu_icon;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $menu_icon = esc_url( $ptype_obj->menu_icon );
</span></span></pre></div>
<a id="trunksrcwpadminoptionspermalinkphp"></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/options-permalink.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/options-permalink.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-admin/options-permalink.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -87,7 +87,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * base prefix, WordPress core can no longer account for the possible collision.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() && ! is_subdomain_install() && is_main_site()
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- && 0 === strpos( $permalink_structure, '/blog/' )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ && str_starts_with( $permalink_structure, '/blog/' )
</ins><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $blog_prefix = '/blog';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -231,7 +231,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() && ! is_subdomain_install() && is_main_site()
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- && 0 === strpos( $permalink_structure, '/blog/' )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ && str_starts_with( $permalink_structure, '/blog/' )
</ins><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $permalink_structure = preg_replace( '|^/?blog|', '', $permalink_structure );
</span><span class="cx" style="display: block; padding: 0 10px"> $category_base = preg_replace( '|^/?blog|', '', $category_base );
</span></span></pre></div>
<a id="trunksrcwpincludesblocktemplatephp"></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/block-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/block-template.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/block-template.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -165,7 +165,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Is the active theme a child theme, and is the PHP fallback template part of it?
</span><span class="cx" style="display: block; padding: 0 10px"> if (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- strpos( $fallback_template, $theme_base_path ) === 0 &&
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ str_starts_with( $fallback_template, $theme_base_path ) &&
</ins><span class="cx" style="display: block; padding: 0 10px"> strpos( $fallback_template, $parent_theme_base_path ) === false
</span><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $fallback_template_slug = substr(
</span></span></pre></div>
<a id="trunksrcwpincludesblocksphp"></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/blocks.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/blocks.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -17,7 +17,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function remove_block_asset_path_prefix( $asset_handle_or_path ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $path_prefix = 'file:';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 !== strpos( $asset_handle_or_path, $path_prefix ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! str_starts_with( $asset_handle_or_path, $path_prefix ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $asset_handle_or_path;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $path = substr(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -24,7 +24,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $asset_handle_or_path,
</span><span class="cx" style="display: block; padding: 0 10px"> strlen( $path_prefix )
</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 ( strpos( $path, './' ) === 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $path, './' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $path = substr( $path, 2 );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> return $path;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,12 +44,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Generated asset name for the block's field.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function generate_block_asset_handle( $block_name, $field_name, $index = 0 ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $block_name, 'core/' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $block_name, 'core/' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $asset_handle = str_replace( 'core/', 'wp-block-', $block_name );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $field_name, 'editor' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $field_name, 'editor' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $asset_handle .= '-editor';
</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 ( 0 === strpos( $field_name, 'view' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $field_name, 'view' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $asset_handle .= '-view';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $index > 0 ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -137,8 +137,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $theme_path_norm = wp_normalize_path( get_theme_file_path() );
</span><span class="cx" style="display: block; padding: 0 10px"> $script_path_norm = wp_normalize_path( realpath( dirname( $metadata['file'] ) . '/' . $script_path ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $is_core_block = isset( $metadata['file'] ) && 0 === strpos( $metadata['file'], $wpinc_path_norm );
- $is_theme_block = 0 === strpos( $script_path_norm, $theme_path_norm );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $is_core_block = isset( $metadata['file'] ) && str_starts_with( $metadata['file'], $wpinc_path_norm );
+ $is_theme_block = str_starts_with( $script_path_norm, $theme_path_norm );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $script_uri = plugins_url( $script_path, $metadata['file'] );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $is_core_block ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -191,7 +191,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $wpinc_path_norm = wp_normalize_path( realpath( ABSPATH . WPINC ) );
</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">- $is_core_block = isset( $metadata['file'] ) && 0 === strpos( $metadata['file'], $wpinc_path_norm );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $is_core_block = isset( $metadata['file'] ) && str_starts_with( $metadata['file'], $wpinc_path_norm );
</ins><span class="cx" style="display: block; padding: 0 10px"> // Skip registering individual styles for each core block when a bundled version provided.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $is_core_block && ! wp_should_load_separate_core_block_assets() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -359,7 +359,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $metadata = apply_filters( 'block_type_metadata', $metadata );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Add `style` and `editor_style` for core blocks if missing.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! empty( $metadata['name'] ) && 0 === strpos( $metadata['name'], 'core/' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $metadata['name'] ) && str_starts_with( $metadata['name'], 'core/' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $block_name = str_replace( 'core/', '', $metadata['name'] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $metadata['style'] ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -698,7 +698,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Block name to use for serialization.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function strip_core_block_namespace( $block_name = null ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( is_string( $block_name ) && 0 === strpos( $block_name, 'core/' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( is_string( $block_name ) && str_starts_with( $block_name, 'core/' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return substr( $block_name, 5 );
</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="trunksrcwpincludesbookmarktemplatephp"></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/bookmark-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/bookmark-template.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/bookmark-template.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -125,7 +125,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $output .= $parsed_args['link_before'];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( null != $bookmark->link_image && $parsed_args['show_images'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( strpos( $bookmark->link_image, 'http' ) === 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $bookmark->link_image, 'http' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $output .= "<img src=\"$bookmark->link_image\" $alt $title />";
</span><span class="cx" style="display: block; padding: 0 10px"> } else { // If it's a relative path.
</span><span class="cx" style="display: block; padding: 0 10px"> $output .= '<img src="' . get_option( 'siteurl' ) . "$bookmark->link_image\" $alt $title />";
</span></span></pre></div>
<a id="trunksrcwpincludesclasssimplepiephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-simplepie.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-simplepie.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/class-simplepie.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -22,7 +22,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_simplepie_autoload( $class ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 !== strpos( $class, 'SimplePie_' ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! str_starts_with( $class, 'SimplePie_' ) )
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $file = ABSPATH . WPINC . '/' . str_replace( '_', '/', $class ) . '.php';
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpcustomizemanagerphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-customize-manager.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-customize-manager.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/class-wp-customize-manager.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1981,7 +1981,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> &&
</span><span class="cx" style="display: block; padding: 0 10px"> $parsed_allowed_url['host'] === $parsed_original_url['host']
</span><span class="cx" style="display: block; padding: 0 10px"> &&
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 0 === strpos( $parsed_original_url['path'], $parsed_allowed_url['path'] )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ str_starts_with( $parsed_original_url['path'], $parsed_allowed_url['path'] )
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $is_allowed ) {
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpcustomizewidgetsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-customize-widgets.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-customize-widgets.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/class-wp-customize-widgets.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2059,7 +2059,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool Whether the option capture is ignored.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected function is_option_capture_ignored( $option_name ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return ( 0 === strpos( $option_name, '_transient_' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return ( str_starts_with( $option_name, '_transient_' ) );
</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="trunksrcwpincludesclasswpqueryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-query.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/class-wp-query.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4757,7 +4757,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $content = str_replace( '<!-- /wp:nextpage -->', '', $content );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Ignore nextpage at the beginning of the content.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $content, '<!--nextpage-->' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $content, '<!--nextpage-->' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $content = substr( $content, 15 );
</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="trunksrcwpincludesclasswprecoverymodeemailservicephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-recovery-mode-email-service.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-recovery-mode-email-service.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/class-wp-recovery-mode-email-service.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -314,7 +314,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $plugins[ "{$extension['slug']}/{$extension['slug']}.php" ];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $plugins as $file => $plugin_data ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $file, "{$extension['slug']}/" ) || $file === $extension['slug'] ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $file, "{$extension['slug']}/" ) || $file === $extension['slug'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $plugin_data;
</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="trunksrcwpincludesclasswprecoverymodephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-recovery-mode.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-recovery-mode.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/class-wp-recovery-mode.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -362,7 +362,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $error_file = wp_normalize_path( $error['file'] );
</span><span class="cx" style="display: block; padding: 0 10px"> $wp_plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
</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 ( 0 === strpos( $error_file, $wp_plugin_dir ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $error_file, $wp_plugin_dir ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $path = str_replace( $wp_plugin_dir . '/', '', $error_file );
</span><span class="cx" style="display: block; padding: 0 10px"> $parts = explode( '/', $path );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -379,7 +379,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $wp_theme_directories as $theme_directory ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $theme_directory = wp_normalize_path( $theme_directory );
</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 ( 0 === strpos( $error_file, $theme_directory ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $error_file, $theme_directory ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $path = str_replace( $theme_directory . '/', '', $error_file );
</span><span class="cx" style="display: block; padding: 0 10px"> $parts = explode( '/', $path );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -413,7 +413,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $network_plugins = wp_get_active_network_plugins();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $network_plugins as $plugin ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $plugin, $extension['slug'] . '/' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $plugin, $extension['slug'] . '/' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</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="trunksrcwpincludesclasswpscriptsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-scripts.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-scripts.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/class-wp-scripts.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -375,7 +375,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $this->content_url && 0 === strpos( $src, $this->content_url ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $this->content_url && str_starts_with( $src, $this->content_url ) ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $src = $this->base_url . $src;
</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">@@ -702,12 +702,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $src, '/' . WPINC . '/js/l10n' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $src, '/' . WPINC . '/js/l10n' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</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"> foreach ( (array) $this->default_dirs as $test ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $src, $test ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $src, $test ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</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="trunksrcwpincludesclasswpstylesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-styles.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-styles.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/class-wp-styles.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -393,7 +393,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Style's fully-qualified URL.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function _css_href( $src, $ver, $handle ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! is_bool( $src ) && ! preg_match( '|^(https?:)?//|', $src ) && ! ( $this->content_url && 0 === strpos( $src, $this->content_url ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! is_bool( $src ) && ! preg_match( '|^(https?:)?//|', $src ) && ! ( $this->content_url && str_starts_with( $src, $this->content_url ) ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $src = $this->base_url . $src;
</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">@@ -427,7 +427,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"> foreach ( (array) $this->default_dirs as $test ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $src, $test ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $src, $test ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</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="trunksrcwpincludesclasswpthemephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-theme.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-theme.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/class-wp-theme.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1768,7 +1768,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Theme[] $themes Array of theme objects to sort (passed by reference).
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public static function sort_by_name( &$themes ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( get_user_locale(), 'en_' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( get_user_locale(), 'en_' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> uasort( $themes, array( 'WP_Theme', '_name_sort' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $themes as $key => $theme ) {
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/class-wp.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -227,7 +227,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( (array) $rewrite as $match => $query ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // If the requested file is the anchor of the match, prepend it to the path info.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! empty( $requested_file ) && strpos( $match, $requested_file ) === 0 && $requested_file != $requested_path ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $requested_file ) && str_starts_with( $match, $requested_file ) && $requested_file != $requested_path ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $request_match = $requested_file . '/' . $requested_path;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludescommentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/comment.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/comment.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/comment.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2816,7 +2816,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Do not search for a pingback server on our own uploads.
</span><span class="cx" style="display: block; padding: 0 10px"> $uploads_dir = wp_get_upload_dir();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $url, $uploads_dir['baseurl'] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $url, $uploads_dir['baseurl'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return 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="trunksrcwpincludeserrorprotectionphp"></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/error-protection.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/error-protection.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/error-protection.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -50,7 +50,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $core_errors = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $constants as $constant => $value ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $constant, 'E_' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $constant, 'E_' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $core_errors[ $value ] = $constant;
</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="trunksrcwpincludesfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/functions.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/functions.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2378,7 +2378,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $uploads['error'] = $tested_paths[ $path ];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! wp_mkdir_p( $path ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $uploads['basedir'], ABSPATH ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $uploads['basedir'], ABSPATH ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $error_path = str_replace( ABSPATH, '', $uploads['basedir'] ) . $uploads['subdir'];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $error_path = wp_basename( $uploads['basedir'] ) . $uploads['subdir'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2413,7 +2413,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $upload_path ) || 'wp-content/uploads' === $upload_path ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $dir = WP_CONTENT_DIR . '/uploads';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 0 !== strpos( $upload_path, ABSPATH ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( ! str_starts_with( $upload_path, ABSPATH ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // $dir is absolute, $upload_path is (maybe) relative to ABSPATH.
</span><span class="cx" style="display: block; padding: 0 10px"> $dir = path_join( ABSPATH, $upload_path );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2575,7 +2575,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $file_type = wp_check_filetype( $filename );
</span><span class="cx" style="display: block; padding: 0 10px"> $mime_type = $file_type['type'];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $is_image = ( ! empty( $mime_type ) && 0 === strpos( $mime_type, 'image/' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $is_image = ( ! empty( $mime_type ) && str_starts_with( $mime_type, 'image/' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> $upload_dir = wp_get_upload_dir();
</span><span class="cx" style="display: block; padding: 0 10px"> $lc_filename = null;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2913,7 +2913,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $new_file = $upload['path'] . "/$filename";
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! wp_mkdir_p( dirname( $new_file ) ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $upload['basedir'], ABSPATH ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $upload['basedir'], ABSPATH ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $error_path = str_replace( ABSPATH, '', $upload['basedir'] ) . $upload['subdir'];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $error_path = wp_basename( $upload['basedir'] ) . $upload['subdir'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3082,7 +3082,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $real_mime = false;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Validate image types.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $type && 0 === strpos( $type, 'image/' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $type && str_starts_with( $type, 'image/' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Attempt to figure out what type of image it actually is.
</span><span class="cx" style="display: block; padding: 0 10px"> $real_mime = wp_get_image_mime( $file );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3153,7 +3153,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $type = false;
</span><span class="cx" style="display: block; padding: 0 10px"> $ext = false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 0 === strpos( $real_mime, 'video/' ) || 0 === strpos( $real_mime, 'audio/' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( str_starts_with( $real_mime, 'video/' ) || str_starts_with( $real_mime, 'audio/' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px"> * For these types, only the major type must match the real value.
</span><span class="cx" style="display: block; padding: 0 10px"> * This means that common mismatches are forgiven: application/vnd.apple.numbers is often misidentified as application/zip,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3311,7 +3311,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $magic = bin2hex( $magic );
</span><span class="cx" style="display: block; padding: 0 10px"> if (
</span><span class="cx" style="display: block; padding: 0 10px"> // RIFF.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ( 0 === strpos( $magic, '52494646' ) ) &&
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ( str_starts_with( $magic, '52494646' ) ) &&
</ins><span class="cx" style="display: block; padding: 0 10px"> // WEBP.
</span><span class="cx" style="display: block; padding: 0 10px"> ( 16 === strpos( $magic, '57454250' ) )
</span><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7183,7 +7183,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_auth_check_html() {
</span><span class="cx" style="display: block; padding: 0 10px"> $login_url = wp_login_url();
</span><span class="cx" style="display: block; padding: 0 10px"> $current_domain = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $same_domain = ( strpos( $login_url, $current_domain ) === 0 );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $same_domain = str_starts_with( $login_url, $current_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"> * Filters whether the authentication check originated at the same domain.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7431,7 +7431,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $real_directory = wp_normalize_path( $real_directory );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( false === $real_file || false === $real_directory || strpos( $real_file, trailingslashit( $real_directory ) ) !== 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( false === $real_file || false === $real_directory || ! str_starts_with( $real_file, trailingslashit( $real_directory ) ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return 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="trunksrcwpincludesgeneraltemplatephp"></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/general-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/general-template.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/general-template.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4860,7 +4860,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_admin_css( $file = 'wp-admin', $force_echo = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // For backward compatibility.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $handle = 0 === strpos( $file, 'css/' ) ? substr( $file, 4 ) : $file;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $handle = str_starts_with( $file, 'css/' ) ? substr( $file, 4 ) : $file;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( wp_styles()->query( $handle ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $force_echo || did_action( 'wp_print_styles' ) ) {
</span></span></pre></div>
<a id="trunksrcwpincludesksesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/kses.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/kses.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/kses.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1260,7 +1260,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Note: the attribute name should only contain `A-Za-z0-9_-` chars,
</span><span class="cx" style="display: block; padding: 0 10px"> * double hyphens `--` are not accepted by WordPress.
</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 ( strpos( $name_low, 'data-' ) === 0 && ! empty( $allowed_attr['data-*'] )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $name_low, 'data-' ) && ! empty( $allowed_attr['data-*'] )
</ins><span class="cx" style="display: block; padding: 0 10px"> && preg_match( '/^data(?:-[a-z0-9_]+)+$/', $name_low, $match )
</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="trunksrcwpincludesl10nphp"></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/l10n.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/l10n.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/l10n.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1084,7 +1084,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $src = $wp_scripts->registered[ $handle ]->src;
</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 ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $wp_scripts->content_url && 0 === strpos( $src, $wp_scripts->content_url ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $wp_scripts->content_url && str_starts_with( $src, $wp_scripts->content_url ) ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $src = $wp_scripts->base_url . $src;
</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">@@ -1098,7 +1098,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If the host is the same or it's a relative URL.
</span><span class="cx" style="display: block; padding: 0 10px"> if (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ( ! isset( $content_url['path'] ) || strpos( $src_url['path'], $content_url['path'] ) === 0 ) &&
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ( ! isset( $content_url['path'] ) || str_starts_with( $src_url['path'], $content_url['path'] ) ) &&
</ins><span class="cx" style="display: block; padding: 0 10px"> ( ! isset( $src_url['host'] ) || ! isset( $content_url['host'] ) || $src_url['host'] === $content_url['host'] )
</span><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Make the src relative the specific plugin or theme.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1115,7 +1115,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $relative = array_slice( $relative, 2 ); // Remove plugins/<plugin name> or themes/<theme name>.
</span><span class="cx" style="display: block; padding: 0 10px"> $relative = implode( '/', $relative );
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif (
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ( ! isset( $plugins_url['path'] ) || strpos( $src_url['path'], $plugins_url['path'] ) === 0 ) &&
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ ( ! isset( $plugins_url['path'] ) || str_starts_with( $src_url['path'], $plugins_url['path'] ) ) &&
</ins><span class="cx" style="display: block; padding: 0 10px"> ( ! isset( $src_url['host'] ) || ! isset( $plugins_url['host'] ) || $src_url['host'] === $plugins_url['host'] )
</span><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Make the src relative the specific plugin.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1134,7 +1134,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( ! isset( $src_url['host'] ) || ! isset( $site_url['host'] ) || $src_url['host'] === $site_url['host'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $site_url['path'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $relative = trim( $src_url['path'], '/' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( ( strpos( $src_url['path'], trailingslashit( $site_url['path'] ) ) === 0 ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( str_starts_with( $src_url['path'], trailingslashit( $site_url['path'] ) ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Make the src relative to the WP root.
</span><span class="cx" style="display: block; padding: 0 10px"> $relative = substr( $src_url['path'], strlen( $site_url['path'] ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $relative = trim( $relative, '/' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1373,8 +1373,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $lang_files ) {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $lang_files as $lang_file ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $lang_file = basename( $lang_file, '.mo' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 !== strpos( $lang_file, 'continents-cities' ) && 0 !== strpos( $lang_file, 'ms-' ) &&
- 0 !== strpos( $lang_file, 'admin-' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! str_starts_with( $lang_file, 'continents-cities' ) && ! str_starts_with( $lang_file, 'ms-' ) &&
+ ! str_starts_with( $lang_file, 'admin-' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $languages[] = $lang_file;
</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="trunksrcwpincludeslinktemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/link-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/link-template.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/link-template.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3636,7 +3636,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $plugin = wp_normalize_path( $plugin );
</span><span class="cx" style="display: block; padding: 0 10px"> $mu_plugin_dir = wp_normalize_path( WPMU_PLUGIN_DIR );
</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 ( ! empty( $plugin ) && 0 === strpos( $plugin, $mu_plugin_dir ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $plugin ) && str_starts_with( $plugin, $mu_plugin_dir ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $url = WPMU_PLUGIN_URL;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $url = WP_PLUGIN_URL;
</span></span></pre></div>
<a id="trunksrcwpincludesmediaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/media.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/media.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/media.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3730,7 +3730,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( get_taxonomies( array(), 'objects' ) as $taxonomy ) {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $taxonomy->object_type as $object_type ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'attachment' === $object_type || 0 === strpos( $object_type, 'attachment:' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'attachment' === $object_type || str_starts_with( $object_type, 'attachment:' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'names' === $output ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $taxonomies[] = $taxonomy->name;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5120,7 +5120,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $path = str_replace( $image_path['scheme'], $site_url['scheme'], $path );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $path, $dir['baseurl'] . '/' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $path, $dir['baseurl'] . '/' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $path = substr( $path, strlen( $dir['baseurl'] . '/' ) );
</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="trunksrcwpincludespluggablephp"></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/pluggable.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/pluggable.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/pluggable.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1187,7 +1187,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If https is required and request is http, redirect.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $secure && ! is_ssl() && false !== strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $_SERVER['REQUEST_URI'], 'http' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> exit;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1218,7 +1218,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If the user wants ssl but the session is not ssl, redirect.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $secure && get_user_option( 'use_ssl', $user_id ) && false !== strpos( $_SERVER['REQUEST_URI'], 'wp-admin' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $_SERVER['REQUEST_URI'], 'http' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> exit;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1281,7 +1281,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'check_admin_referer', $action, $result );
</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 ( ! $result && ! ( -1 === $action && strpos( $referer, $adminurl ) === 0 ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $result && ! ( -1 === $action && str_starts_with( $referer, $adminurl ) ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_nonce_ays( $action );
</span><span class="cx" style="display: block; padding: 0 10px"> die();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpincludespluginphp"></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/plugin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/plugin.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/plugin.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -770,7 +770,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> arsort( $wp_plugin_paths );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $wp_plugin_paths as $dir => $realdir ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( strpos( $file, $realdir ) === 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $file, $realdir ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $file = $dir . substr( $file, strlen( $realdir ) );
</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="trunksrcwpincludesposttemplatephp"></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/post-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/post-template.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/post-template.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -887,7 +887,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $hasher = new PasswordHash( 8, true );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $hash = wp_unslash( $_COOKIE[ 'wp-postpass_' . COOKIEHASH ] );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 !== strpos( $hash, '$P$B' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! str_starts_with( $hash, '$P$B' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $required = true;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $required = ! $hasher->CheckPassword( $post->post_password, $hash );
</span></span></pre></div>
<a id="trunksrcwpincludespostphp"></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/post.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/post.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/post.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -723,7 +723,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $file = get_post_meta( $attachment_id, '_wp_attached_file', true );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If the file is relative, prepend upload dir.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $file && 0 !== strpos( $file, '/' ) && ! preg_match( '|^.:\\\|', $file ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $file && ! str_starts_with( $file, '/' ) && ! preg_match( '|^.:\\\|', $file ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $uploads = wp_get_upload_dir();
</span><span class="cx" style="display: block; padding: 0 10px"> if ( false === $uploads['error'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $file = $uploads['basedir'] . "/$file";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -795,7 +795,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $new_path = $path;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $uploads = wp_get_upload_dir();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $new_path, $uploads['basedir'] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $new_path, $uploads['basedir'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $new_path = str_replace( $uploads['basedir'], '', $new_path );
</span><span class="cx" style="display: block; padding: 0 10px"> $new_path = ltrim( $new_path, '/' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6483,7 +6483,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $uploads = wp_get_upload_dir();
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $uploads && false === $uploads['error'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Check that the upload base exists in the file location.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $file, $uploads['basedir'] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $file, $uploads['basedir'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Replace file location with url location.
</span><span class="cx" style="display: block; padding: 0 10px"> $url = str_replace( $uploads['basedir'], $uploads['baseurl'], $file );
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( false !== strpos( $file, 'wp-content/uploads' ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6612,7 +6612,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $post->post_mime_type, $type . '/' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $post->post_mime_type, $type . '/' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</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="trunksrcwpincludesrestapiclasswprestrequestphp"></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/rest-api/class-wp-rest-request.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/class-wp-rest-request.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/rest-api/class-wp-rest-request.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1031,7 +1031,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"> $api_root = rest_url();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( get_option( 'permalink_structure' ) && 0 === strpos( $url, $api_root ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( get_option( 'permalink_structure' ) && str_starts_with( $url, $api_root ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Pretty permalinks on, and URL is under the API root.
</span><span class="cx" style="display: block; padding: 0 10px"> $api_url_part = substr( $url, strlen( untrailingslashit( $api_root ) ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $route = parse_url( $api_url_part, PHP_URL_PATH );
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiclasswprestserverphp"></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/rest-api/class-wp-rest-server.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/class-wp-rest-server.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/rest-api/class-wp-rest-server.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -648,7 +648,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Convert $rel URIs to their compact versions if they exist.
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $curies as $curie ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $href_prefix = substr( $curie['href'], 0, strpos( $curie['href'], '{rel}' ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( strpos( $rel, $href_prefix ) !== 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! str_starts_with( $rel, $href_prefix ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1044,7 +1044,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $with_namespace = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $this->get_namespaces() as $namespace ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( trailingslashit( ltrim( $path, '/' ) ), $namespace ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( trailingslashit( ltrim( $path, '/' ) ), $namespace ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $with_namespace[] = $this->get_routes( $namespace );
</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">@@ -1827,7 +1827,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"> foreach ( $server as $key => $value ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( strpos( $key, 'HTTP_' ) === 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $key, 'HTTP_' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $headers[ substr( $key, 5 ) ] = $value;
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( 'REDIRECT_HTTP_AUTHORIZATION' === $key && empty( $server['HTTP_AUTHORIZATION'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiphp"></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/rest-api.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/rest-api.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -939,12 +939,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $fields as $accepted_field ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Check to see if $field is the parent of any item in $fields.
</span><span class="cx" style="display: block; padding: 0 10px"> // A field "parent" should be accepted if "parent.child" is accepted.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( strpos( $accepted_field, "$field." ) === 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $accepted_field, "$field." ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> // Conversely, if "parent" is accepted, all "parent.child" fields
</span><span class="cx" style="display: block; padding: 0 10px"> // should also be accepted.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( strpos( $field, "$accepted_field." ) === 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $field, "$accepted_field." ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return true;
</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="trunksrcwpincludesrewritephp"></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/rewrite.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rewrite.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/rewrite.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -600,7 +600,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If the requesting file is the anchor of the match,
</span><span class="cx" style="display: block; padding: 0 10px"> // prepend it to the path info.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! empty( $url ) && ( $url != $request ) && ( strpos( $match, $url ) === 0 ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $url ) && ( $url != $request ) && str_starts_with( $match, $url ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $request_match = $url . '/' . $request;
</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="trunksrcwpincludesscriptloaderphp"></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/script-loader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/script-loader.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/script-loader.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -184,7 +184,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $src = $scripts->registered[ $handle ]->src;
</span><span class="cx" style="display: block; padding: 0 10px"> $ver = $scripts->registered[ $handle ]->ver;
</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 ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $scripts->content_url && 0 === strpos( $src, $scripts->content_url ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $scripts->content_url && str_starts_with( $src, $scripts->content_url ) ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $src = $scripts->base_url . $src;
</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="trunksrcwpincludestaxonomyphp"></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/taxonomy.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/taxonomy.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/taxonomy.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2262,7 +2262,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $terms_from_remaining_taxonomies = get_terms( $args );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Array keys should be preserved for values of $fields that use term_id for keys.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! empty( $args['fields'] ) && 0 === strpos( $args['fields'], 'id=>' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $args['fields'] ) && str_starts_with( $args['fields'], 'id=>' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $terms = $terms + $terms_from_remaining_taxonomies;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = array_merge( $terms, $terms_from_remaining_taxonomies );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3506,7 +3506,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $object_types = (array) $taxonomy->object_type;
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $object_types as &$object_type ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $object_type, 'attachment:' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $object_type, 'attachment:' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> list( $object_type ) = explode( ':', $object_type );
</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="trunksrcwpincludesthemephp"></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/theme.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/theme.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/theme.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -457,7 +457,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * to use in get_theme_root().
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $wp_theme_directories as $theme_root ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $theme_root, WP_CONTENT_DIR ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $theme_root, WP_CONTENT_DIR ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $relative_theme_roots[ str_replace( WP_CONTENT_DIR, '', $theme_root ) ] = $theme_root;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $relative_theme_roots[ $theme_root ] = $theme_root;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -634,11 +634,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $stylesheet_or_template && $theme_root ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( in_array( $theme_root, (array) $wp_theme_directories, true ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Absolute path. Make an educated guess. YMMV -- but note the filter below.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $theme_root, WP_CONTENT_DIR ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $theme_root, WP_CONTENT_DIR ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $theme_root_uri = content_url( str_replace( WP_CONTENT_DIR, '', $theme_root ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 0 === strpos( $theme_root, ABSPATH ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( str_starts_with( $theme_root, ABSPATH ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $theme_root_uri = site_url( str_replace( ABSPATH, '', $theme_root ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 0 === strpos( $theme_root, WP_PLUGIN_DIR ) || 0 === strpos( $theme_root, WPMU_PLUGIN_DIR ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( str_starts_with( $theme_root, WP_PLUGIN_DIR ) || str_starts_with( $theme_root, WPMU_PLUGIN_DIR ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $theme_root_uri = plugins_url( basename( $theme_root ), $theme_root );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $theme_root_uri = $theme_root;
</span></span></pre></div>
<a id="trunksrcwpincludesuserphp"></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/user.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/user.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/user.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -989,7 +989,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'capabilities' !== substr( $key, -12 ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $wpdb->base_prefix && 0 !== strpos( $key, $wpdb->base_prefix ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $wpdb->base_prefix && ! str_starts_with( $key, $wpdb->base_prefix ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $site_id = str_replace( array( $wpdb->base_prefix, '_capabilities' ), '', $key );
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsclasswpwidgetblockphp"></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/widgets/class-wp-widget-block.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets/class-wp-widget-block.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-includes/widgets/class-wp-widget-block.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -223,7 +223,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool Updated `is_wide` value.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function set_is_wide_widget_in_customizer( $is_wide, $widget_id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( strpos( $widget_id, 'block-' ) === 0 ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $widget_id, 'block-' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return 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="trunksrcwploginphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-login.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-login.php 2023-05-02 11:24:52 UTC (rev 55702)
+++ trunk/src/wp-login.php 2023-05-02 15:43:03 UTC (rev 55703)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -13,7 +13,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Redirect to HTTPS login if forced to use SSL.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( force_ssl_admin() && ! is_ssl() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 === strpos( $_SERVER['REQUEST_URI'], 'http' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( str_starts_with( $_SERVER['REQUEST_URI'], 'http' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> wp_safe_redirect( set_url_scheme( $_SERVER['REQUEST_URI'], 'https' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> exit;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span></span></pre>
</div>
</div>
</body>
</html>