<!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>[47848] trunk/src: Coding Standards: Use strict comparison for `count()` calls.</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/47848">47848</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/47848","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>2020-05-23 11:36:36 +0000 (Sat, 23 May 2020)</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'>Coding Standards: Use strict comparison for `count()` calls.
See <a href="https://core.trac.wordpress.org/ticket/49542">#49542</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesbookmarkphp">trunk/src/wp-admin/includes/bookmark.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpupgraderphp">trunk/src/wp-admin/includes/class-wp-upgrader.php</a></li>
<li><a href="#trunksrcwpadminincludesdeprecatedphp">trunk/src/wp-admin/includes/deprecated.php</a></li>
<li><a href="#trunksrcwpadminincludesfilephp">trunk/src/wp-admin/includes/file.php</a></li>
<li><a href="#trunksrcwpadminincludesmenuphp">trunk/src/wp-admin/includes/menu.php</a></li>
<li><a href="#trunksrcwpadminincludesmsphp">trunk/src/wp-admin/includes/ms.php</a></li>
<li><a href="#trunksrcwpadminnavmenusphp">trunk/src/wp-admin/nav-menus.php</a></li>
<li><a href="#trunksrcwpadminnetworkphp">trunk/src/wp-admin/network.php</a></li>
<li><a href="#trunksrcwpadminthemesphp">trunk/src/wp-admin/themes.php</a></li>
<li><a href="#trunksrcwpadminupdatecorephp">trunk/src/wp-admin/update-core.php</a></li>
<li><a href="#trunksrcwpadminusersphp">trunk/src/wp-admin/users.php</a></li>
<li><a href="#trunksrcwpincludesclasswpuserphp">trunk/src/wp-includes/class-wp-user.php</a></li>
<li><a href="#trunksrcwpincludesformattingphp">trunk/src/wp-includes/formatting.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>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesbookmarkphp"></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/bookmark.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/bookmark.php 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-admin/includes/bookmark.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -198,7 +198,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $link_category = ( ! empty( $parsed_args['link_category'] ) ) ? $parsed_args['link_category'] : array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Make sure we set a valid category.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! is_array( $link_category ) || 0 == count( $link_category ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! is_array( $link_category ) || 0 === count( $link_category ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $link_category = array( get_option( 'default_link_category' ) );
</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">@@ -257,7 +257,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_set_link_cats( $link_id = 0, $link_categories = array() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // If $link_categories isn't already an array, make it one:
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! is_array( $link_categories ) || 0 == count( $link_categories ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! is_array( $link_categories ) || 0 === count( $link_categories ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $link_categories = array( get_option( 'default_link_category' ) );
</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="trunksrcwpadminincludesclasswpupgraderphp"></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-upgrader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-upgrader.php 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-admin/includes/class-wp-upgrader.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -498,7 +498,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $remote_destination = $wp_filesystem->find_folder( $local_destination );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Locate which directory to copy to the new folder. This is based on the actual folder holding the files.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 1 == count( $source_files ) && $wp_filesystem->is_dir( trailingslashit( $args['source'] ) . $source_files[0] . '/' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 1 === count( $source_files ) && $wp_filesystem->is_dir( trailingslashit( $args['source'] ) . $source_files[0] . '/' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Only one folder? Then we want its contents.
</span><span class="cx" style="display: block; padding: 0 10px"> $source = trailingslashit( $args['source'] ) . trailingslashit( $source_files[0] );
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( count( $source_files ) == 0 ) {
</span></span></pre></div>
<a id="trunksrcwpadminincludesdeprecatedphp"></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/deprecated.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/deprecated.php 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-admin/includes/deprecated.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1339,7 +1339,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Pick a random, non-installed plugin.
</span><span class="cx" style="display: block; padding: 0 10px"> while ( true ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Abort this foreach loop iteration if there's no plugins left of this type.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 0 == count($items) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 0 === count($items) )
</ins><span class="cx" style="display: block; padding: 0 10px"> continue 2;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $item_key = array_rand($items);
</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 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-admin/includes/file.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1627,7 +1627,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return new WP_Error( 'incompatible_archive', __( 'Incompatible Archive.' ), $archive->errorInfo( 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 == count( $archive_files ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 0 === count( $archive_files ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new WP_Error( 'empty_archive_pclzip', __( 'Empty archive.' ) );
</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 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-admin/includes/menu.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -168,7 +168,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * If there is only one submenu and it is has same destination as the parent,
</span><span class="cx" style="display: block; padding: 0 10px"> * remove the submenu.
</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( $submenu[ $data[2] ] ) && 1 == count( $submenu[ $data[2] ] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $submenu[ $data[2] ] ) && 1 === count( $submenu[ $data[2] ] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $subs = $submenu[ $data[2] ];
</span><span class="cx" style="display: block; padding: 0 10px"> $first_sub = reset( $subs );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $data[2] == $first_sub[2] ) {
</span></span></pre></div>
<a id="trunksrcwpadminincludesmsphp"></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/ms.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/ms.php 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-admin/includes/ms.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -856,7 +856,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <h1><?php esc_html_e( 'Users' ); ?></h1>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php if ( 1 == count( $users ) ) : ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php if ( 1 === count( $users ) ) : ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <p><?php _e( 'You have chosen to delete the user from all networks and sites.' ); ?></p>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php else : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <p><?php _e( 'You have chosen to delete the following users from all networks and sites.' ); ?></p>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -974,7 +974,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** This action is documented in wp-admin/users.php */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'delete_user_form', $current_user, $allusers );
</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 ( 1 == count( $users ) ) :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 1 === count( $users ) ) :
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <p><?php _e( 'Once you hit “Confirm Deletion”, the user will be permanently removed.' ); ?></p>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php else : ?>
</span></span></pre></div>
<a id="trunksrcwpadminnavmenusphp"></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/nav-menus.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/nav-menus.php 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-admin/nav-menus.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -423,12 +423,19 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $locations_screen = ( isset( $_GET['action'] ) && 'locations' === $_GET['action'] ) ? true : false;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+$page_count = wp_count_posts( 'page' );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px"> * If we have one theme location, and zero menus, we take them right
</span><span class="cx" style="display: block; padding: 0 10px"> * into editing their first menu.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-$page_count = wp_count_posts( 'page' );
-$one_theme_location_no_menus = ( 1 == count( get_registered_nav_menus() ) && ! $add_new_screen && empty( $nav_menus ) && ! empty( $page_count->publish ) ) ? true : false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( 1 === count( get_registered_nav_menus() ) && ! $add_new_screen
+ && empty( $nav_menus ) && ! empty( $page_count->publish )
+) {
+ $one_theme_location_no_menus = true;
+} else {
+ $one_theme_location_no_menus = false;
+}
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $nav_menus_l10n = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'oneThemeLocationNoMenus' => $one_theme_location_no_menus,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -928,7 +935,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"> $hide_style = '';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( isset( $menu_items ) && 0 == count( $menu_items ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( isset( $menu_items ) && 0 === count( $menu_items ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $hide_style = 'style="display: none;"';
</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="trunksrcwpadminnetworkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/network.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/network.php 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-admin/network.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -99,7 +99,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! network_domain_check() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $result = populate_network( 1, get_clean_basedomain(), sanitize_email( $_POST['email'] ), wp_unslash( $_POST['sitename'] ), $base, $subdomain_install );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_wp_error( $result ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 1 == count( $result->get_error_codes() ) && 'no_wildcard_dns' === $result->get_error_code() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 1 === count( $result->get_error_codes() ) && 'no_wildcard_dns' === $result->get_error_code() ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> network_step2( $result );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> network_step1( $result );
</span></span></pre></div>
<a id="trunksrcwpadminthemesphp"></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/themes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/themes.php 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-admin/themes.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -285,7 +285,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"> // Certain error codes are less fatal than others. We can still display theme information in most cases.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-if ( ! $ct->errors() || ( 1 == count( $ct->errors()->get_error_codes() )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( ! $ct->errors() || ( 1 === count( $ct->errors()->get_error_codes() )
</ins><span class="cx" style="display: block; padding: 0 10px"> && in_array( $ct->errors()->get_error_code(), array( 'theme_no_parent', 'theme_parent_invalid', 'theme_no_index' ) ) ) ) : ?>
</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="trunksrcwpadminupdatecorephp"></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/update-core.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/update-core.php 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-admin/update-core.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -46,7 +46,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $version_string = $update->current;
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( 'en_US' === $update->locale && $update->packages->partial && $wp_version == $update->partial_version ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $updates = get_core_updates();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $updates && 1 == count( $updates ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $updates && 1 === count( $updates ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // If the only available update is a partial builds, it doesn't need a language-specific version string.
</span><span class="cx" style="display: block; padding: 0 10px"> $version_string = $update->current;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="trunksrcwpadminusersphp"></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/users.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/users.php 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-admin/users.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -278,7 +278,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </div>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php endif; ?>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php if ( 1 == count( $all_userids ) ) : ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php if ( 1 === count( $all_userids ) ) : ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <p><?php _e( 'You have specified this user for deletion:' ); ?></p>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php else : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <p><?php _e( 'You have specified these users for deletion:' ); ?></p>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -415,7 +415,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <div class="wrap">
</span><span class="cx" style="display: block; padding: 0 10px"> <h1><?php _e( 'Remove Users from Site' ); ?></h1>
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php if ( 1 == count( $userids ) ) : ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php if ( 1 === count( $userids ) ) : ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> <p><?php _e( 'You have specified this user for removal:' ); ?></p>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php else : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <p><?php _e( 'You have specified these users for removal:' ); ?></p>
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpuserphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-user.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-user.php 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-includes/class-wp-user.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -590,7 +590,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $role Role name.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function set_role( $role ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 1 == count( $this->roles ) && current( $this->roles ) == $role ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 1 === count( $this->roles ) && current( $this->roles ) == $role ) {
</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">
</span></span></pre></div>
<a id="trunksrcwpincludesformattingphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/formatting.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/formatting.php 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-includes/formatting.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -406,7 +406,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $text[1] ) && '/' !== $text[1] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $opening_tag = true;
</span><span class="cx" style="display: block; padding: 0 10px"> $name_offset = 1;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 0 == count( $stack ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 0 === count( $stack ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Stack is empty. Just stop.
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</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 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-includes/post-template.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1072,7 +1072,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! isset( $custom[ $key ] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 1 == count( $custom[ $key ] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 1 === count( $custom[ $key ] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $custom[ $key ][0];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> return $custom[ $key ];
</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 2020-05-23 06:23:14 UTC (rev 47847)
+++ trunk/src/wp-includes/post.php 2020-05-23 11:36:36 UTC (rev 47848)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3709,7 +3709,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"> // Make sure we set a valid category.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( empty( $post_category ) || 0 == count( $post_category ) || ! is_array( $post_category ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( empty( $post_category ) || 0 === count( $post_category ) || ! is_array( $post_category ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // 'post' requires at least one category.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'post' === $post_type && 'auto-draft' !== $post_status ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $post_category = array( get_option( 'default_category' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4684,7 +4684,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $post_categories = array();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 1 == count( $post_categories ) && '' === reset( $post_categories ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 1 === count( $post_categories ) && '' === reset( $post_categories ) ) {
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5439,7 +5439,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $where .= $wpdb->prepare( ' AND post_parent = %d ', $parent );
</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 ( 1 == count( $post_status ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 1 === count( $post_status ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $where_post_type = $wpdb->prepare( 'post_type = %s AND post_status = %s', $parsed_args['post_type'], reset( $post_status ) );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $post_status = implode( "', '", $post_status );
</span></span></pre>
</div>
</div>
</body>
</html>