<!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>[45590] trunk: Coding Standards: Fix the `Squiz.PHP.DisallowMultipleAssignments` violations in `wp-includes`.</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/45590">45590</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/45590","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>pento</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2019-07-02 23:41:16 +0000 (Tue, 02 Jul 2019)</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: Fix the `Squiz.PHP.DisallowMultipleAssignments` violations in `wp-includes`.
See <a href="https://core.trac.wordpress.org/ticket/47632">#47632</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkphpcsxmldist">trunk/phpcs.xml.dist</a></li>
<li><a href="#trunksrcjs_enqueuesvendortinymcewptinymcephp">trunk/src/js/_enqueues/vendor/tinymce/wp-tinymce.php</a></li>
<li><a href="#trunksrcwpincludesadminbarphp">trunk/src/wp-includes/admin-bar.php</a></li>
<li><a href="#trunksrcwpincludesauthortemplatephp">trunk/src/wp-includes/author-template.php</a></li>
<li><a href="#trunksrcwpincludesbookmarkphp">trunk/src/wp-includes/bookmark.php</a></li>
<li><a href="#trunksrcwpincludescanonicalphp">trunk/src/wp-includes/canonical.php</a></li>
<li><a href="#trunksrcwpincludescapabilitiesphp">trunk/src/wp-includes/capabilities.php</a></li>
<li><a href="#trunksrcwpincludescategorytemplatephp">trunk/src/wp-includes/category-template.php</a></li>
<li><a href="#trunksrcwpincludescategoryphp">trunk/src/wp-includes/category.php</a></li>
<li><a href="#trunksrcwpincludesclasshttpphp">trunk/src/wp-includes/class-http.php</a></li>
<li><a href="#trunksrcwpincludesclassoembedphp">trunk/src/wp-includes/class-oembed.php</a></li>
<li><a href="#trunksrcwpincludesclasswpadminbarphp">trunk/src/wp-includes/class-wp-admin-bar.php</a></li>
<li><a href="#trunksrcwpincludesclasswpajaxresponsephp">trunk/src/wp-includes/class-wp-ajax-response.php</a></li>
<li><a href="#trunksrcwpincludesclasswpcommentqueryphp">trunk/src/wp-includes/class-wp-comment-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswpcustomizewidgetsphp">trunk/src/wp-includes/class-wp-customize-widgets.php</a></li>
<li><a href="#trunksrcwpincludesclasswpeditorphp">trunk/src/wp-includes/class-wp-editor.php</a></li>
<li><a href="#trunksrcwpincludesclasswpembedphp">trunk/src/wp-includes/class-wp-embed.php</a></li>
<li><a href="#trunksrcwpincludesclasswphookphp">trunk/src/wp-includes/class-wp-hook.php</a></li>
<li><a href="#trunksrcwpincludesclasswphttpcurlphp">trunk/src/wp-includes/class-wp-http-curl.php</a></li>
<li><a href="#trunksrcwpincludesclasswphttpencodingphp">trunk/src/wp-includes/class-wp-http-encoding.php</a></li>
<li><a href="#trunksrcwpincludesclasswphttpstreamsphp">trunk/src/wp-includes/class-wp-http-streams.php</a></li>
<li><a href="#trunksrcwpincludesclasswpimageeditorphp">trunk/src/wp-includes/class-wp-image-editor.php</a></li>
<li><a href="#trunksrcwpincludesclasswplistutilphp">trunk/src/wp-includes/class-wp-list-util.php</a></li>
<li><a href="#trunksrcwpincludesclasswpmetaqueryphp">trunk/src/wp-includes/class-wp-meta-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswpnetworkqueryphp">trunk/src/wp-includes/class-wp-network-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswpqueryphp">trunk/src/wp-includes/class-wp-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswprewritephp">trunk/src/wp-includes/class-wp-rewrite.php</a></li>
<li><a href="#trunksrcwpincludesclasswpsitequeryphp">trunk/src/wp-includes/class-wp-site-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswptaxqueryphp">trunk/src/wp-includes/class-wp-tax-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswptermqueryphp">trunk/src/wp-includes/class-wp-term-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswptextdiffrenderertablephp">trunk/src/wp-includes/class-wp-text-diff-renderer-table.php</a></li>
<li><a href="#trunksrcwpincludesclasswpthemephp">trunk/src/wp-includes/class-wp-theme.php</a></li>
<li><a href="#trunksrcwpincludesclasswpuserqueryphp">trunk/src/wp-includes/class-wp-user-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswpuserphp">trunk/src/wp-includes/class-wp-user.php</a></li>
<li><a href="#trunksrcwpincludesclasswpwidgetphp">trunk/src/wp-includes/class-wp-widget.php</a></li>
<li><a href="#trunksrcwpincludesclasswpxmlrpcserverphp">trunk/src/wp-includes/class-wp-xmlrpc-server.php</a></li>
<li><a href="#trunksrcwpincludesclasswpdependenciesphp">trunk/src/wp-includes/class.wp-dependencies.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="#trunksrcwpincludescommenttemplatephp">trunk/src/wp-includes/comment-template.php</a></li>
<li><a href="#trunksrcwpincludescommentphp">trunk/src/wp-includes/comment.php</a></li>
<li><a href="#trunksrcwpincludescustomizeclasswpcustomizenavmenulocationcontrolphp">trunk/src/wp-includes/customize/class-wp-customize-nav-menu-location-control.php</a></li>
<li><a href="#trunksrcwpincludesdatephp">trunk/src/wp-includes/date.php</a></li>
<li><a href="#trunksrcwpincludesfeedatomcommentsphp">trunk/src/wp-includes/feed-atom-comments.php</a></li>
<li><a href="#trunksrcwpincludesfeedrss2commentsphp">trunk/src/wp-includes/feed-rss2-comments.php</a></li>
<li><a href="#trunksrcwpincludesformattingphp">trunk/src/wp-includes/formatting.php</a></li>
<li><a href="#trunksrcwpincludesfunctionsphp">trunk/src/wp-includes/functions.php</a></li>
<li><a href="#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="#trunksrcwpincludesloadphp">trunk/src/wp-includes/load.php</a></li>
<li><a href="#trunksrcwpincludesmetaphp">trunk/src/wp-includes/meta.php</a></li>
<li><a href="#trunksrcwpincludesmsfunctionsphp">trunk/src/wp-includes/ms-functions.php</a></li>
<li><a href="#trunksrcwpincludesmsloadphp">trunk/src/wp-includes/ms-load.php</a></li>
<li><a href="#trunksrcwpincludesnavmenutemplatephp">trunk/src/wp-includes/nav-menu-template.php</a></li>
<li><a href="#trunksrcwpincludesoptionphp">trunk/src/wp-includes/option.php</a></li>
<li><a href="#trunksrcwpincludespluggablephp">trunk/src/wp-includes/pluggable.php</a></li>
<li><a href="#trunksrcwpincludespomopluralformsphp">trunk/src/wp-includes/pomo/plural-forms.php</a></li>
<li><a href="#trunksrcwpincludesposttemplatephp">trunk/src/wp-includes/post-template.php</a></li>
<li><a href="#trunksrcwpincludespostthumbnailtemplatephp">trunk/src/wp-includes/post-thumbnail-template.php</a></li>
<li><a href="#trunksrcwpincludespostphp">trunk/src/wp-includes/post.php</a></li>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswprestpostscontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php</a></li>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswpresttermscontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php</a></li>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswprestuserscontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php</a></li>
<li><a href="#trunksrcwpincludesrevisionphp">trunk/src/wp-includes/revision.php</a></li>
<li><a href="#trunksrcwpincludestaxonomyphp">trunk/src/wp-includes/taxonomy.php</a></li>
<li><a href="#trunksrcwpincludestemplateloaderphp">trunk/src/wp-includes/template-loader.php</a></li>
<li><a href="#trunksrcwpincludesthemephp">trunk/src/wp-includes/theme.php</a></li>
<li><a href="#trunksrcwpincludesupdatephp">trunk/src/wp-includes/update.php</a></li>
<li><a href="#trunksrcwpincludesuserphp">trunk/src/wp-includes/user.php</a></li>
<li><a href="#trunksrcwpincludesvarsphp">trunk/src/wp-includes/vars.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsclasswpnavmenuwidgetphp">trunk/src/wp-includes/widgets/class-wp-nav-menu-widget.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsclasswpwidgetlinksphp">trunk/src/wp-includes/widgets/class-wp-widget-links.php</a></li>
<li><a href="#trunksrcwpincludeswidgetsphp">trunk/src/wp-includes/widgets.php</a></li>
<li><a href="#trunksrcwpincludeswpdbphp">trunk/src/wp-includes/wp-db.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkphpcsxmldist"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/phpcs.xml.dist</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/phpcs.xml.dist 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/phpcs.xml.dist 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -103,6 +103,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/src/wp-includes/blocks/*</exclude-pattern>
</span><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/src/wp-includes/ID3/*</exclude-pattern>
</span><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/src/wp-includes/IXR/*</exclude-pattern>
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <exclude-pattern>/src/wp-includes/js/*</exclude-pattern>
</ins><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/src/wp-includes/random_compat/*</exclude-pattern>
</span><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/src/wp-includes/Requests/*</exclude-pattern>
</span><span class="cx" style="display: block; padding: 0 10px"> <exclude-pattern>/src/wp-includes/SimplePie/*</exclude-pattern>
</span></span></pre></div>
<a id="trunksrcjs_enqueuesvendortinymcewptinymcephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/js/_enqueues/vendor/tinymce/wp-tinymce.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/vendor/tinymce/wp-tinymce.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/js/_enqueues/vendor/tinymce/wp-tinymce.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,7 +33,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
</span><span class="cx" style="display: block; padding: 0 10px"> header( "Cache-Control: public, max-age=$expires_offset" );
</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 ( isset( $_GET['c'] ) && ( $file = get_file( $basepath . '/wp-tinymce.js' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+$file = get_file( $basepath . '/wp-tinymce.js' );
+if ( isset( $_GET['c'] ) && $file ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo $file;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> // Even further back compat.
</span></span></pre></div>
<a id="trunksrcwpincludesadminbarphp"></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/admin-bar.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/admin-bar.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/admin-bar.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -688,10 +688,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_admin() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $current_screen = get_current_screen();
</span><span class="cx" style="display: block; padding: 0 10px"> $post = get_post();
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'post' == $current_screen->base ) {
+ $post_type_object = get_post_type_object( $post->post_type );
+ } elseif ( 'edit' == $current_screen->base ) {
+ $post_type_object = get_post_type_object( $current_screen->post_type );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'post' == $current_screen->base
</span><span class="cx" style="display: block; padding: 0 10px"> && 'add' != $current_screen->action
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- && ( $post_type_object = get_post_type_object( $post->post_type ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ && ( $post_type_object )
</ins><span class="cx" style="display: block; padding: 0 10px"> && current_user_can( 'read_post', $post->ID )
</span><span class="cx" style="display: block; padding: 0 10px"> && ( $post_type_object->public )
</span><span class="cx" style="display: block; padding: 0 10px"> && ( $post_type_object->show_in_admin_bar ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -715,7 +720,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"> } elseif ( 'edit' == $current_screen->base
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- && ( $post_type_object = get_post_type_object( $current_screen->post_type ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ && ( $post_type_object )
</ins><span class="cx" style="display: block; padding: 0 10px"> && ( $post_type_object->public )
</span><span class="cx" style="display: block; padding: 0 10px"> && ( $post_type_object->show_in_admin_bar )
</span><span class="cx" style="display: block; padding: 0 10px"> && ( get_post_type_archive_link( $post_type_object->name ) )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -727,29 +732,29 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'href' => get_post_type_archive_link( $current_screen->post_type ),
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( 'term' == $current_screen->base
- && isset( $tag ) && is_object( $tag ) && ! is_wp_error( $tag )
- && ( $tax = get_taxonomy( $tag->taxonomy ) )
- && is_taxonomy_viewable( $tax ) ) {
- $wp_admin_bar->add_menu(
- array(
- 'id' => 'view',
- 'title' => $tax->labels->view_item,
- 'href' => get_term_link( $tag ),
- )
- );
- } elseif ( 'user-edit' == $current_screen->base
- && isset( $user_id )
- && ( $user_object = get_userdata( $user_id ) )
- && $user_object->exists()
- && $view_link = get_author_posts_url( $user_object->ID ) ) {
- $wp_admin_bar->add_menu(
- array(
- 'id' => 'view',
- 'title' => __( 'View User' ),
- 'href' => $view_link,
- )
- );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( 'term' == $current_screen->base && isset( $tag ) && is_object( $tag ) && ! is_wp_error( $tag ) ) {
+ $tax = get_taxonomy( $tag->taxonomy );
+ if ( is_taxonomy_viewable( $tax ) ) {
+ $wp_admin_bar->add_menu(
+ array(
+ 'id' => 'view',
+ 'title' => $tax->labels->view_item,
+ 'href' => get_term_link( $tag ),
+ )
+ );
+ }
+ } elseif ( 'user-edit' == $current_screen->base && isset( $user_id ) ) {
+ $user_object = get_userdata( $user_id );
+ $view_link = get_author_posts_url( $user_object->ID );
+ if ( $user_object->exists() && $view_link ) {
+ $wp_admin_bar->add_menu(
+ array(
+ 'id' => 'view',
+ 'title' => __( 'View User' ),
+ 'href' => $view_link,
+ )
+ );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $current_object = $wp_the_query->get_queried_object();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -758,39 +763,44 @@
</span><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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! empty( $current_object->post_type )
- && ( $post_type_object = get_post_type_object( $current_object->post_type ) )
- && current_user_can( 'edit_post', $current_object->ID )
- && $post_type_object->show_in_admin_bar
- && $edit_post_link = get_edit_post_link( $current_object->ID ) ) {
- $wp_admin_bar->add_menu(
- array(
- 'id' => 'edit',
- 'title' => $post_type_object->labels->edit_item,
- 'href' => $edit_post_link,
- )
- );
- } elseif ( ! empty( $current_object->taxonomy )
- && ( $tax = get_taxonomy( $current_object->taxonomy ) )
- && current_user_can( 'edit_term', $current_object->term_id )
- && $edit_term_link = get_edit_term_link( $current_object->term_id, $current_object->taxonomy ) ) {
- $wp_admin_bar->add_menu(
- array(
- 'id' => 'edit',
- 'title' => $tax->labels->edit_item,
- 'href' => $edit_term_link,
- )
- );
- } elseif ( is_a( $current_object, 'WP_User' )
- && current_user_can( 'edit_user', $current_object->ID )
- && $edit_user_link = get_edit_user_link( $current_object->ID ) ) {
- $wp_admin_bar->add_menu(
- array(
- 'id' => 'edit',
- 'title' => __( 'Edit User' ),
- 'href' => $edit_user_link,
- )
- );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $current_object->post_type ) ) {
+ $post_type_object = get_post_type_object( $current_object->post_type );
+ $edit_post_link = get_edit_post_link( $current_object->ID );
+ if ( $post_type_object
+ && $edit_post_link
+ && current_user_can( 'edit_post', $current_object->ID )
+ && $post_type_object->show_in_admin_bar ) {
+ $wp_admin_bar->add_menu(
+ array(
+ 'id' => 'edit',
+ 'title' => $post_type_object->labels->edit_item,
+ 'href' => $edit_post_link,
+ )
+ );
+ }
+ } elseif ( ! empty( $current_object->taxonomy ) ) {
+ $tax = get_taxonomy( $current_object->taxonomy );
+ $edit_term_link = get_edit_term_link( $current_object->term_id, $current_object->taxonomy );
+ if ( $tax && $edit_term_link && current_user_can( 'edit_term', $current_object->term_id ) ) {
+ $wp_admin_bar->add_menu(
+ array(
+ 'id' => 'edit',
+ 'title' => $tax->labels->edit_item,
+ 'href' => $edit_term_link,
+ )
+ );
+ }
+ } elseif ( is_a( $current_object, 'WP_User' ) && current_user_can( 'edit_user', $current_object->ID ) ) {
+ $edit_user_link = get_edit_user_link( $current_object->ID );
+ if ( $edit_user_link ) {
+ $wp_admin_bar->add_menu(
+ array(
+ 'id' => 'edit',
+ 'title' => __( 'Edit User' ),
+ 'href' => $edit_user_link,
+ )
+ );
+ }
</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="trunksrcwpincludesauthortemplatephp"></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/author-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/author-template.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/author-template.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -541,7 +541,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function is_multi_author() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( false === ( $is_multi_author = get_transient( 'is_multi_author' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $is_multi_author = get_transient( 'is_multi_author' );
+ if ( false === $is_multi_author ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $rows = (array) $wpdb->get_col( "SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 2" );
</span><span class="cx" style="display: block; padding: 0 10px"> $is_multi_author = 1 < count( $rows ) ? 1 : 0;
</span><span class="cx" style="display: block; padding: 0 10px"> set_transient( 'is_multi_author', $is_multi_author );
</span></span></pre></div>
<a id="trunksrcwpincludesbookmarkphp"></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.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/bookmark.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/bookmark.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -34,11 +34,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $GLOBALS['link'] ) && ( $GLOBALS['link']->link_id == $bookmark ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $_bookmark = & $GLOBALS['link'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( ! $_bookmark = wp_cache_get( $bookmark, 'bookmark' ) ) {
- $_bookmark = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->links WHERE link_id = %d LIMIT 1", $bookmark ) );
- if ( $_bookmark ) {
- $_bookmark->link_category = array_unique( wp_get_object_terms( $_bookmark->link_id, 'link_category', array( 'fields' => 'ids' ) ) );
- wp_cache_add( $_bookmark->link_id, $_bookmark, 'bookmark' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } else {
+ $_bookmark = wp_cache_get( $bookmark, 'bookmark' );
+ if ( ! $_bookmark ) {
+ $_bookmark = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->links WHERE link_id = %d LIMIT 1", $bookmark ) );
+ if ( $_bookmark ) {
+ $_bookmark->link_category = array_unique( wp_get_object_terms( $_bookmark->link_id, 'link_category', array( 'fields' => 'ids' ) ) );
+ wp_cache_add( $_bookmark->link_id, $_bookmark, 'bookmark' );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -139,8 +142,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $r = wp_parse_args( $args, $defaults );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $key = md5( serialize( $r ) );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $cache = false;
- if ( 'rand' !== $r['orderby'] && $cache = wp_cache_get( 'get_bookmarks', 'bookmark' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cache = wp_cache_get( 'get_bookmarks', 'bookmark' );
+ if ( 'rand' !== $r['orderby'] && $cache ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( is_array( $cache ) && isset( $cache[ $key ] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $bookmarks = $cache[ $key ];
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -204,7 +207,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $r['category_name'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $r['category'] = get_term_by( 'name', $r['category_name'], 'link_category' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $r['category'] = get_term_by( 'name', $r['category_name'], 'link_category' );
+ if ( $r['category'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $r['category'] = $r['category']->term_id;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $cache[ $key ] = array();
</span></span></pre></div>
<a id="trunksrcwpincludescanonicalphp"></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/canonical.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/canonical.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/canonical.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -93,23 +93,28 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $redirect['query'] = remove_query_arg( 'preview', $redirect['query'] );
</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_feed() && ( $id = get_query_var( 'p' ) ) ) {
- if ( $redirect_url = get_post_comments_feed_link( $id, get_query_var( 'feed' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $id = get_query_var( 'p' );
+
+ if ( is_feed() && $id ) {
+ $redirect_url = get_post_comments_feed_link( $id, get_query_var( 'feed' ) );
+ if ( $redirect_url ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type', 'feed' ), $redirect_url );
</span><span class="cx" style="display: block; padding: 0 10px"> $redirect['path'] = parse_url( $redirect_url, PHP_URL_PATH );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( is_singular() && 1 > $wp_query->post_count && ( $id = get_query_var( 'p' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( is_singular() && 1 > $wp_query->post_count && $id ) {
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $vars = $wpdb->get_results( $wpdb->prepare( "SELECT post_type, post_parent FROM $wpdb->posts WHERE ID = %d", $id ) );
</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 ( isset( $vars[0] ) && $vars = $vars[0] ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $vars[0] ) ) {
+ $vars = $vars[0];
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 'revision' == $vars->post_type && $vars->post_parent > 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $id = $vars->post_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 ( $redirect_url = get_permalink( $id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_url = get_permalink( $id );
+ if ( $redirect_url ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ), $redirect_url );
</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">@@ -119,8 +124,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_404() ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Redirect ?page_id, ?p=, ?attachment_id= to their respective url's
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $id = max( get_query_var( 'p' ), get_query_var( 'page_id' ), get_query_var( 'attachment_id' ) );
- if ( $id && $redirect_post = get_post( $id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $id = max( get_query_var( 'p' ), get_query_var( 'page_id' ), get_query_var( 'attachment_id' ) );
+ $redirect_post = $id ? get_post( $id ) : false;
+ if ( $redirect_post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $post_type_obj = get_post_type_object( $redirect_post->post_type );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $post_type_obj->public && 'auto-draft' != $redirect_post->post_status ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $redirect_url = get_permalink( $redirect_post );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -143,7 +149,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $redirect_url ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $redirect_url = redirect_guess_404_permalink() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_url = redirect_guess_404_permalink();
+ if ( $redirect_url ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $redirect['query'] = _remove_qs_args_if_not_in_url( $redirect['query'], array( 'page', 'feed', 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ), $redirect_url );
</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">@@ -168,21 +175,25 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $redirect_url = get_attachment_link();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( is_single() && ! empty( $_GET['p'] ) && ! $redirect_url ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $redirect_url = get_permalink( get_query_var( 'p' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_url = get_permalink( get_query_var( 'p' ) );
+ if ( $redirect_url ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $redirect['query'] = remove_query_arg( array( 'p', 'post_type' ), $redirect['query'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( is_single() && ! empty( $_GET['name'] ) && ! $redirect_url ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $redirect_url = get_permalink( $wp_query->get_queried_object_id() ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_url = get_permalink( $wp_query->get_queried_object_id() );
+ if ( $redirect_url ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $redirect['query'] = remove_query_arg( 'name', $redirect['query'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( is_page() && ! empty( $_GET['page_id'] ) && ! $redirect_url ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $redirect_url = get_permalink( get_query_var( 'page_id' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_url = get_permalink( get_query_var( 'page_id' ) );
+ if ( $redirect_url ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $redirect['query'] = remove_query_arg( 'page_id', $redirect['query'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( is_page() && ! is_feed() && 'page' == get_option( 'show_on_front' ) && get_queried_object_id() == get_option( 'page_on_front' ) && ! $redirect_url ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $redirect_url = home_url( '/' );
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( is_home() && ! empty( $_GET['page_id'] ) && 'page' == get_option( 'show_on_front' ) && get_query_var( 'page_id' ) == get_option( 'page_for_posts' ) && ! $redirect_url ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $redirect_url = get_permalink( get_option( 'page_for_posts' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_url = get_permalink( get_option( 'page_for_posts' ) );
+ if ( $redirect_url ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $redirect['query'] = remove_query_arg( 'page_id', $redirect['query'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( ! empty( $_GET['m'] ) && ( is_year() || is_month() || is_day() ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -203,21 +214,25 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> // now moving on to non ?m=X year/month/day links
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( is_day() && get_query_var( 'year' ) && get_query_var( 'monthnum' ) && ! empty( $_GET['day'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $redirect_url = get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_url = get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) );
+ if ( $redirect_url ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $redirect['query'] = remove_query_arg( array( 'year', 'monthnum', 'day' ), $redirect['query'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( is_month() && get_query_var( 'year' ) && ! empty( $_GET['monthnum'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $redirect_url = get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_url = get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) );
+ if ( $redirect_url ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $redirect['query'] = remove_query_arg( array( 'year', 'monthnum' ), $redirect['query'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( is_year() && ! empty( $_GET['year'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $redirect_url = get_year_link( get_query_var( 'year' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_url = get_year_link( get_query_var( 'year' ) );
+ if ( $redirect_url ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $redirect['query'] = remove_query_arg( 'year', $redirect['query'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( is_author() && ! empty( $_GET['author'] ) && preg_match( '|^[0-9]+$|', $_GET['author'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $author = get_userdata( get_query_var( 'author' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ( false !== $author ) && $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE $wpdb->posts.post_author = %d AND $wpdb->posts.post_status = 'publish' LIMIT 1", $author->ID ) ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $redirect_url = get_author_posts_url( $author->ID, $author->user_nicename ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_url = get_author_posts_url( $author->ID, $author->user_nicename );
+ if ( $redirect_url ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $redirect['query'] = remove_query_arg( 'author', $redirect['query'] );
</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">@@ -229,49 +244,55 @@
</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"> $obj = $wp_query->get_queried_object();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $term_count <= 1 && ! empty( $obj->term_id ) && ( $tax_url = get_term_link( (int) $obj->term_id, $obj->taxonomy ) ) && ! is_wp_error( $tax_url ) ) {
- if ( ! empty( $redirect['query'] ) ) {
- // Strip taxonomy query vars off the url.
- $qv_remove = array( 'term', 'taxonomy' );
- if ( is_category() ) {
- $qv_remove[] = 'category_name';
- $qv_remove[] = 'cat';
- } elseif ( is_tag() ) {
- $qv_remove[] = 'tag';
- $qv_remove[] = 'tag_id';
- } else { // Custom taxonomies will have a custom query var, remove those too:
- $tax_obj = get_taxonomy( $obj->taxonomy );
- if ( false !== $tax_obj->query_var ) {
- $qv_remove[] = $tax_obj->query_var;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $term_count <= 1 && ! empty( $obj->term_id ) ) {
+ $tax_url = get_term_link( (int) $obj->term_id, $obj->taxonomy );
+ if ( $tax_url && ! is_wp_error( $tax_url ) ) {
+ if ( ! empty( $redirect['query'] ) ) {
+ // Strip taxonomy query vars off the url.
+ $qv_remove = array( 'term', 'taxonomy' );
+ if ( is_category() ) {
+ $qv_remove[] = 'category_name';
+ $qv_remove[] = 'cat';
+ } elseif ( is_tag() ) {
+ $qv_remove[] = 'tag';
+ $qv_remove[] = 'tag_id';
+ } else { // Custom taxonomies will have a custom query var, remove those too:
+ $tax_obj = get_taxonomy( $obj->taxonomy );
+ if ( false !== $tax_obj->query_var ) {
+ $qv_remove[] = $tax_obj->query_var;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- }
</del><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $rewrite_vars = array_diff( array_keys( $wp_query->query ), array_keys( $_GET ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $rewrite_vars = array_diff( array_keys( $wp_query->query ), array_keys( $_GET ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! array_diff( $rewrite_vars, array_keys( $_GET ) ) ) { // Check to see if all the Query vars are coming from the rewrite, none are set via $_GET
- $redirect['query'] = remove_query_arg( $qv_remove, $redirect['query'] ); //Remove all of the per-tax qv's
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! array_diff( $rewrite_vars, array_keys( $_GET ) ) ) { // Check to see if all the Query vars are coming from the rewrite, none are set via $_GET
+ $redirect['query'] = remove_query_arg( $qv_remove, $redirect['query'] ); //Remove all of the per-tax qv's
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Create the destination url for this taxonomy
- $tax_url = parse_url( $tax_url );
- if ( ! empty( $tax_url['query'] ) ) { // Taxonomy accessible via ?taxonomy=..&term=.. or any custom qv..
- parse_str( $tax_url['query'], $query_vars );
- $redirect['query'] = add_query_arg( $query_vars, $redirect['query'] );
- } else { // Taxonomy is accessible via a "pretty-URL"
- $redirect['path'] = $tax_url['path'];
- }
- } else { // Some query vars are set via $_GET. Unset those from $_GET that exist via the rewrite
- foreach ( $qv_remove as $_qv ) {
- if ( isset( $rewrite_vars[ $_qv ] ) ) {
- $redirect['query'] = remove_query_arg( $_qv, $redirect['query'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Create the destination url for this taxonomy
+ $tax_url = parse_url( $tax_url );
+ if ( ! empty( $tax_url['query'] ) ) { // Taxonomy accessible via ?taxonomy=..&term=.. or any custom qv..
+ parse_str( $tax_url['query'], $query_vars );
+ $redirect['query'] = add_query_arg( $query_vars, $redirect['query'] );
+ } else { // Taxonomy is accessible via a "pretty-URL"
+ $redirect['path'] = $tax_url['path'];
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } else { // Some query vars are set via $_GET. Unset those from $_GET that exist via the rewrite
+ foreach ( $qv_remove as $_qv ) {
+ if ( isset( $rewrite_vars[ $_qv ] ) ) {
+ $redirect['query'] = remove_query_arg( $_qv, $redirect['query'] );
+ }
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( is_single() && strpos( $wp_rewrite->permalink_structure, '%category%' ) !== false && $cat = get_query_var( 'category_name' ) ) {
- $category = get_category_by_path( $cat );
- if ( ( ! $category || is_wp_error( $category ) ) || ! has_term( $category->term_id, 'category', $wp_query->get_queried_object_id() ) ) {
- $redirect_url = get_permalink( $wp_query->get_queried_object_id() );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( is_single() && strpos( $wp_rewrite->permalink_structure, '%category%' ) !== false ) {
+ $cat = get_query_var( 'category_name' );
+ if ( $cat ) {
+ $category = get_category_by_path( $cat );
+ if ( ( ! $category || is_wp_error( $category ) ) || ! has_term( $category->term_id, 'category', $wp_query->get_queried_object_id() ) ) {
+ $redirect_url = get_permalink( $wp_query->get_queried_object_id() );
+ }
</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="trunksrcwpincludescapabilitiesphp"></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/capabilities.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/capabilities.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/capabilities.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -727,7 +727,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool Whether the post author has the given capability.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function author_can( $post, $capability ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $post ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post );
+ if ( ! $post ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -966,7 +967,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $user = get_userdata( $user_id );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( false !== ( $key = array_search( $user->user_login, $super_admins ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = array_search( $user->user_login, $super_admins );
+ if ( false !== $key ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> unset( $super_admins[ $key ] );
</span><span class="cx" style="display: block; padding: 0 10px"> update_site_option( 'site_admins', $super_admins );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludescategorytemplatephp"></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/category-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/category-template.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/category-template.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1223,7 +1223,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * or the post does not exist, WP_Error on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_the_terms( $post, $taxonomy ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $post ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post );
+ if ( ! $post ) {
</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="trunksrcwpincludescategoryphp"></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/category.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/category.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/category.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -51,7 +51,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> '<code>taxonomy => link_category</code>'
</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">- $taxonomy = $args['taxonomy'] = 'link_category';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $taxonomy = 'link_category';
+ $args['taxonomy'] = $taxonomy;
</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"> $categories = get_terms( $taxonomy, $args );
</span></span></pre></div>
<a id="trunksrcwpincludesclasshttpphp"></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-http.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-http.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-http.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -926,11 +926,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $maybe_relative_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 ( ! $url_parts = wp_parse_url( $url ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $url_parts = wp_parse_url( $url );
+ if ( ! $url_parts ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $maybe_relative_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 ( ! $relative_url_parts = wp_parse_url( $maybe_relative_path ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $relative_url_parts = wp_parse_url( $maybe_relative_path );
+ if ( ! $relative_url_parts ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $maybe_relative_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="trunksrcwpincludesclassoembedphp"></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-oembed.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-oembed.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-oembed.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -440,7 +440,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Fetch URL content
</span><span class="cx" style="display: block; padding: 0 10px"> $request = wp_safe_remote_get( $url, $args );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $html = wp_remote_retrieve_body( $request ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $html = wp_remote_retrieve_body( $request );
+ if ( $html ) {
</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 the link types that contain oEmbed provider URLs.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -461,7 +462,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Strip <body>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $html_head_end = stripos( $html, '</head>' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $html_head_end = stripos( $html, '</head>' );
+ if ( $html_head_end ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $html = substr( $html, 0, $html_head_end );
</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">@@ -559,7 +561,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 501 == wp_remote_retrieve_response_code( $response ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return new WP_Error( 'not-implemented' );
</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 ( ! $body = wp_remote_retrieve_body( $response ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $body = wp_remote_retrieve_body( $response );
+ if ( ! $body ) {
</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"> $parse_method = "_parse_$format";
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpadminbarphp"></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-admin-bar.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-admin-bar.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-admin-bar.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -144,7 +144,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If the node already exists, keep any data that isn't provided.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $maybe_defaults = $this->get_node( $args['id'] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $maybe_defaults = $this->get_node( $args['id'] );
+ if ( $maybe_defaults ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $defaults = get_object_vars( $maybe_defaults );
</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">@@ -183,7 +184,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return object Node.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> final public function get_node( $id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $node = $this->_get_node( $id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $node = $this->_get_node( $id );
+ if ( $node ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return clone $node;
</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">@@ -210,7 +212,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array|void
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> final public function get_nodes() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $nodes = $this->_get_nodes() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $nodes = $this->_get_nodes();
+ if ( ! $nodes ) {
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -312,7 +315,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Fetch the parent node. If it isn't registered, ignore the node.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $parent = $this->_get_node( $node->parent ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $parent = $this->_get_node( $node->parent );
+ if ( ! $parent ) {
</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="trunksrcwpincludesclasswpajaxresponsephp"></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-ajax-response.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-ajax-response.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-ajax-response.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -90,8 +90,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $response = '';
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_wp_error( $data ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( (array) $data->get_error_codes() as $code ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $response .= "<wp_error code='$code'><![CDATA[" . $data->get_error_message( $code ) . ']]></wp_error>';
- if ( ! $error_data = $data->get_error_data( $code ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $response .= "<wp_error code='$code'><![CDATA[" . $data->get_error_message( $code ) . ']]></wp_error>';
+ $error_data = $data->get_error_data( $code );
+ if ( ! $error_data ) {
</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"> $class = '';
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpcommentqueryphp"></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-comment-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-comment-query.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-comment-query.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -429,7 +429,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Fetch full comment objects from the primed cache.
</span><span class="cx" style="display: block; padding: 0 10px"> $_comments = array();
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $comment_ids as $comment_id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $_comment = get_comment( $comment_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $_comment = get_comment( $comment_id );
+ if ( $_comment ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $_comments[] = $_comment;
</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">@@ -950,8 +951,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $exclude_keys = array( 'parent', 'parent__in', 'parent__not_in' );
</span><span class="cx" style="display: block; padding: 0 10px"> do {
</span><span class="cx" style="display: block; padding: 0 10px"> // Parent-child relationships may be cached. Only query for those that are not.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $child_ids = $uncached_parent_ids = array();
- $_parent_ids = $levels[ $level ];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $child_ids = array();
+ $uncached_parent_ids = array();
+ $_parent_ids = $levels[ $level ];
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $_parent_ids as $parent_id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $cache_key = "get_comment_child_ids:$parent_id:$key:$last_changed";
</span><span class="cx" style="display: block; padding: 0 10px"> $parent_child_ids = wp_cache_get( $cache_key, 'comment' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1009,7 +1011,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If a threaded representation was requested, build the tree.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'threaded' === $this->query_vars['hierarchical'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $threaded_comments = $ref = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $threaded_comments = array();
+ $ref = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $all_comments as $k => $c ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $_c = get_comment( $c->comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px">
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-customize-widgets.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1438,11 +1438,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $value = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $value[ $parsed_id['number'] ] = $instance;
</span><span class="cx" style="display: block; padding: 0 10px"> $key = 'widget-' . $parsed_id['id_base'];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $_REQUEST[ $key ] = $_POST[ $key ] = wp_slash( $value );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $_REQUEST[ $key ] = wp_slash( $value );
+ $_POST[ $key ] = $_REQUEST[ $key ];
</ins><span class="cx" style="display: block; padding: 0 10px"> $added_input_vars[] = $key;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $instance as $key => $value ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $_REQUEST[ $key ] = $_POST[ $key ] = wp_slash( $value );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $_REQUEST[ $key ] = wp_slash( $value );
+ $_POST[ $key ] = $_REQUEST[ $key ];
</ins><span class="cx" style="display: block; padding: 0 10px"> $added_input_vars[] = $key;
</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">@@ -1856,8 +1858,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Render the widget.
</span><span class="cx" style="display: block; padding: 0 10px"> ob_start();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- dynamic_sidebar( $this->rendering_sidebar_id = $context['sidebar_id'] );
- $container = ob_get_clean();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->rendering_sidebar_id = $context['sidebar_id'];
+ dynamic_sidebar( $this->rendering_sidebar_id );
+ $container = ob_get_clean();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Reset variables for next partial render.
</span><span class="cx" style="display: block; padding: 0 10px"> remove_filter( 'sidebars_widgets', $filter_callback, 1000 );
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpeditorphp"></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-editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-editor.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-editor.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -158,7 +158,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $editor_class = ' class="' . trim( esc_attr( $set['editor_class'] ) . ' wp-editor-area' ) . '"';
</span><span class="cx" style="display: block; padding: 0 10px"> $tabindex = $set['tabindex'] ? ' tabindex="' . (int) $set['tabindex'] . '"' : '';
</span><span class="cx" style="display: block; padding: 0 10px"> $default_editor = 'html';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $buttons = $autocomplete = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $buttons = '';
+ $autocomplete = '';
</ins><span class="cx" style="display: block; padding: 0 10px"> $editor_id_attr = esc_attr( $editor_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $set['drag_drop_upload'] ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -437,7 +438,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins ) );
</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 ( ( $key = array_search( 'spellchecker', $plugins ) ) !== false ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $key = array_search( 'spellchecker', $plugins );
+ if ( false !== $key ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Remove 'spellchecker' from the internal plugins if added with 'tiny_mce_plugins' filter to prevent errors.
</span><span class="cx" style="display: block; padding: 0 10px"> // It can be added with 'mce_external_plugins'.
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $plugins[ $key ] );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -581,7 +583,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $editor_id Unique editor identifier, e.g. 'content'.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $mce_buttons = apply_filters( 'teeny_mce_buttons', array( 'bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'fullscreen' ), $editor_id );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $mce_buttons_2 = array();
+ $mce_buttons_3 = array();
+ $mce_buttons_4 = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $mce_buttons = array( 'formatselect', 'bold', 'italic', 'bullist', 'numlist', 'blockquote', 'alignleft', 'aligncenter', 'alignright', 'link', 'wp_more', 'spellchecker' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -646,7 +650,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $body_class = $editor_id;
</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 ( $post = get_post() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post();
+ if ( $post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $body_class .= ' post-type-' . sanitize_html_class( $post->post_type ) . ' post-status-' . sanitize_html_class( $post->post_status );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( post_type_supports( $post->post_type, 'post-formats' ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1460,7 +1465,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> global $tinymce_version;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $tmce_on = ! empty( self::$mce_settings );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $mceInit = $qtInit = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $mceInit = '';
+ $qtInit = '';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $tmce_on ) {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( self::$mce_settings as $editor_id => $init ) {
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpembedphp"></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-embed.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-embed.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-embed.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -170,7 +170,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $this->handlers as $priority => $handlers ) {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $handlers as $id => $handler ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( preg_match( $handler['regex'], $url, $matches ) && is_callable( $handler['callback'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( false !== $return = call_user_func( $handler['callback'], $matches, $attr, $url, $rawattr ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $return = call_user_func( $handler['callback'], $matches, $attr, $url, $rawattr );
+ if ( false !== $return ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the returned embed handler.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span></span></pre></div>
<a id="trunksrcwpincludesclasswphookphp"></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-hook.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-hook.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-hook.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -272,7 +272,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $num_args = count( $args );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> do {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
+ $priority = $this->current_priority[ $nesting_level ];
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $this->callbacks[ $priority ] as $the_ ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $this->doing_action ) {
</span></span></pre></div>
<a id="trunksrcwpincludesclasswphttpcurlphp"></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-http-curl.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-http-curl.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-http-curl.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -235,7 +235,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $r['blocking'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> curl_exec( $handle );
</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 ( $curl_error = curl_error( $handle ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $curl_error = curl_error( $handle );
+ if ( $curl_error ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> curl_close( $handle );
</span><span class="cx" style="display: block; padding: 0 10px"> return new WP_Error( 'http_request_failed', $curl_error );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -281,7 +282,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $curl_error = curl_error( $handle ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $curl_error = curl_error( $handle );
+ if ( $curl_error ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> curl_close( $handle );
</span><span class="cx" style="display: block; padding: 0 10px"> return new WP_Error( 'http_request_failed', $curl_error );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -307,7 +309,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Handle redirects.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( false !== ( $redirect_response = WP_HTTP::handle_redirects( $url, $r, $response ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_response = WP_HTTP::handle_redirects( $url, $r, $response );
+ if ( false !== $redirect_response ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $redirect_response;
</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="trunksrcwpincludesclasswphttpencodingphp"></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-http-encoding.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-http-encoding.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-http-encoding.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -52,15 +52,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $compressed;
</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 !== ( $decompressed = @gzinflate( $compressed ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $decompressed = @gzinflate( $compressed );
+ if ( false !== $decompressed ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $decompressed;
</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 !== ( $decompressed = self::compatible_gzinflate( $compressed ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $decompressed = self::compatible_gzinflate( $compressed );
+ if ( false !== $decompressed ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $decompressed;
</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 !== ( $decompressed = @gzuncompress( $compressed ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $decompressed = @gzuncompress( $compressed );
+ if ( false !== $decompressed ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $decompressed;
</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="trunksrcwpincludesclasswphttpstreamsphp"></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-http-streams.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-http-streams.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-http-streams.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -326,7 +326,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Handle redirects.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( false !== ( $redirect_response = WP_Http::handle_redirects( $url, $r, $response ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $redirect_response = WP_Http::handle_redirects( $url, $r, $response );
+ if ( false !== $redirect_response ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $redirect_response;
</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="trunksrcwpincludesclasswpimageeditorphp"></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-image-editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-image-editor.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-image-editor.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -359,8 +359,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $name = wp_basename( $this->file, ".$ext" );
</span><span class="cx" style="display: block; padding: 0 10px"> $new_ext = strtolower( $extension ? $extension : $ext );
</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_null( $dest_path ) && $_dest_path = realpath( $dest_path ) ) {
- $dir = $_dest_path;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! is_null( $dest_path ) ) {
+ $_dest_path = realpath( $dest_path );
+ if ( $_dest_path ) {
+ $dir = $_dest_path;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return trailingslashit( $dir ) . "{$name}-{$suffix}.{$new_ext}";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -392,7 +395,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected function make_image( $filename, $function, $arguments ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $stream = wp_is_stream( $filename ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $stream = wp_is_stream( $filename );
+ if ( $stream ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> ob_start();
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> // The directory containing the original file may no longer exist when using a replication plugin.
</span></span></pre></div>
<a id="trunksrcwpincludesclasswplistutilphp"></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-list-util.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-list-util.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-list-util.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -48,7 +48,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $input Array to perform operations on.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function __construct( $input ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->output = $this->input = $input;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->output = $input;
+ $this->input = $input;
</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="trunksrcwpincludesclasswpmetaqueryphp"></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-meta-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-meta-query.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-meta-query.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -312,7 +312,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_sql( $type, $primary_table, $primary_id_column, $context = null ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $meta_table = _get_meta_table( $type ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $meta_table = _get_meta_table( $type );
+ if ( ! $meta_table ) {
</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="trunksrcwpincludesclasswpnetworkqueryphp"></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-network-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-network-query.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-network-query.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -268,7 +268,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Fetch full network objects from the primed cache.
</span><span class="cx" style="display: block; padding: 0 10px"> $_networks = array();
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $network_ids as $network_id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $_network = get_network( $network_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $_network = get_network( $network_id );
+ if ( $_network ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $_networks[] = $_network;
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-query.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -731,7 +731,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> public function parse_query( $query = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $query ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->init();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->query = $this->query_vars = wp_parse_args( $query );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->query = wp_parse_args( $query );
+ $this->query_vars = $this->query;
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( ! isset( $this->query ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->query = $this->query_vars;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1140,7 +1141,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Category stuff
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $q['cat'] ) && ! $this->is_singular ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $cat_in = $cat_not_in = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cat_in = array();
+ $cat_not_in = array();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $cat_array = preg_split( '/[,\s]+/', urldecode( $q['cat'] ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $cat_array = array_map( 'intval', $cat_array );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2034,7 +2036,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $reqpage_obj = get_post( $reqpage );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_object( $reqpage_obj ) && 'attachment' == $reqpage_obj->post_type ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->is_attachment = true;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $post_type = $q['post_type'] = 'attachment';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post_type = 'attachment';
+ $q['post_type'] = 'attachment';
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->is_page = true;
</span><span class="cx" style="display: block; padding: 0 10px"> $q['attachment_id'] = $reqpage;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2888,7 +2891,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $found_rows = 'SQL_CALC_FOUND_ROWS';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->request = $old_request = "SELECT $found_rows $distinct $fields FROM {$wpdb->posts} $join WHERE 1=1 $where $groupby $orderby $limits";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $old_request = "SELECT $found_rows $distinct $fields FROM {$wpdb->posts} $join WHERE 1=1 $where $groupby $orderby $limits";
+ $this->request = $old_request;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $q['suppress_filters'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3400,7 +3404,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function query( $query ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->init();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->query = $this->query_vars = wp_parse_args( $query );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->query = wp_parse_args( $query );
+ $this->query_vars = $this->query;
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->get_posts();
</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="trunksrcwpincludesclasswprewritephp"></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-rewrite.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-rewrite.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-rewrite.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1834,7 +1834,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function init() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->extra_rules = $this->non_wp_rules = $this->endpoints = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->extra_rules = array();
+ $this->non_wp_rules = array();
+ $this->endpoints = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->permalink_structure = get_option( 'permalink_structure' );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->front = substr( $this->permalink_structure, 0, strpos( $this->permalink_structure, '%' ) );
</span><span class="cx" style="display: block; padding: 0 10px"> $this->root = '';
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpsitequeryphp"></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-site-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-site-query.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-site-query.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -361,7 +361,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Fetch full site objects from the primed cache.
</span><span class="cx" style="display: block; padding: 0 10px"> $_sites = array();
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $site_ids as $site_id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $_site = get_site( $site_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $_site = get_site( $site_id );
+ if ( $_site ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $_sites[] = $_site;
</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="trunksrcwpincludesclasswptaxqueryphp"></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-tax-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-tax-query.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-tax-query.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -388,7 +388,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'join' => array(),
</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">- $join = $where = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $join = '';
+ $where = '';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $this->clean_query( $clause );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludesclasswptermqueryphp"></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-term-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-term-query.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-term-query.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -771,7 +771,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * removed.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $args['object_ids'] ) && 'all_with_object_id' != $_fields ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $_tt_ids = $_terms = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $_tt_ids = array();
+ $_terms = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $terms as $term ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $_tt_ids[ $term->term_id ] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</span></span></pre></div>
<a id="trunksrcwpincludesclasswptextdiffrenderertablephp"></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-text-diff-renderer-table.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-text-diff-renderer-table.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-text-diff-renderer-table.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -400,8 +400,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ksort( $final_matches );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Stores rows and blanks for each column.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $orig_rows = $orig_rows_copy = array_keys( $orig_matches );
- $final_rows = array_keys( $final_matches );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $orig_rows = array_keys( $orig_matches );
+ $orig_rows_copy = $orig_rows;
+ $final_rows = array_keys( $final_matches );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Interleaves rows with blanks to keep matches aligned.
</span><span class="cx" style="display: block; padding: 0 10px"> // We may end up with some extraneous blank rows, but we'll just ignore them later.
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-theme.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -262,7 +262,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->headers = get_file_data( $this->theme_root . '/' . $theme_file, self::$file_headers, 'theme' );
</span><span class="cx" style="display: block; padding: 0 10px"> // Default themes always trump their pretenders.
</span><span class="cx" style="display: block; padding: 0 10px"> // Properly identify default themes that are inside a directory within wp-content/themes.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $default_theme_slug = array_search( $this->headers['Name'], self::$default_themes ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $default_theme_slug = array_search( $this->headers['Name'], self::$default_themes );
+ if ( $default_theme_slug ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( basename( $this->stylesheet ) != $default_theme_slug ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->headers['Name'] .= '/' . $this->stylesheet;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -285,7 +286,11 @@
</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 template is set from cache [and there are no errors], we know it's good.)
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $this->template && ! ( $this->template = $this->headers['Template'] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $this->template ) {
+ $this->template = $this->headers['Template'];
+ }
+
+ if ( ! $this->template ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->template = $this->stylesheet;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! file_exists( $this->theme_root . '/' . $this->stylesheet . '/index.php' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $error_message = sprintf(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -313,10 +318,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_array( $cache ) && $this->template != $this->stylesheet && ! file_exists( $this->theme_root . '/' . $this->template . '/index.php' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // If we're in a directory of themes inside /themes, look for the parent nearby.
</span><span class="cx" style="display: block; padding: 0 10px"> // wp-content/themes/directory-of-themes/*
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $parent_dir = dirname( $this->stylesheet );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $parent_dir = dirname( $this->stylesheet );
+ $directories = search_theme_directories();
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( '.' != $parent_dir && file_exists( $this->theme_root . '/' . $parent_dir . '/' . $this->template . '/index.php' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->template = $parent_dir . '/' . $this->template;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( ( $directories = search_theme_directories() ) && isset( $directories[ $this->template ] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( $directories && isset( $directories[ $this->template ] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Look for the template in the search_theme_directories() results, in case it is in another theme root.
</span><span class="cx" style="display: block; padding: 0 10px"> // We don't look into directories of themes, just the theme root.
</span><span class="cx" style="display: block; padding: 0 10px"> $theme_root_template = $directories[ $this->template ]['theme_root'];
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -668,8 +674,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( array( 'theme', 'screenshot', 'headers', 'post_templates' ) as $key ) {
</span><span class="cx" style="display: block; padding: 0 10px"> wp_cache_delete( $key . '-' . $this->cache_hash, 'themes' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->template = $this->textdomain_loaded = $this->theme_root_uri = $this->parent = $this->errors = $this->headers_sanitized = $this->name_translated = null;
- $this->headers = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->template = null;
+ $this->textdomain_loaded = null;
+ $this->theme_root_uri = null;
+ $this->parent = null;
+ $this->errors = null;
+ $this->headers_sanitized = null;
+ $this->name_translated = null;
+ $this->headers = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->__construct( $this->stylesheet, $this->theme_root );
</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">@@ -1317,8 +1329,9 @@
</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">- $path = $this->get_stylesheet_directory();
- if ( $domainpath = $this->get( 'DomainPath' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $path = $this->get_stylesheet_directory();
+ $domainpath = $this->get( 'DomainPath' );
+ if ( $domainpath ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $path .= $domainpath;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $path .= '/languages';
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpuserqueryphp"></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-query.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-user-query.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-user-query.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -327,7 +327,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Prevent extra meta query.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $qv['blog_id'] = $blog_id = 0;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $qv['blog_id'] = 0;
+ $blog_id = 0;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $this->meta_query->queries ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->meta_query->queries = array( $who_query );
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-user.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -233,17 +233,19 @@
</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 !== $user_id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $user = wp_cache_get( $user_id, 'users' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = wp_cache_get( $user_id, 'users' );
+ if ( $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $user;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $wpdb->get_row(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $wpdb->get_row(
</ins><span class="cx" style="display: block; padding: 0 10px"> $wpdb->prepare(
</span><span class="cx" style="display: block; padding: 0 10px"> "SELECT * FROM $wpdb->users WHERE $db_field = %s LIMIT 1",
</span><span class="cx" style="display: block; padding: 0 10px"> $value
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ );
+ if ( ! $user ) {
</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="trunksrcwpincludesclasswpwidgetphp"></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-widget.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-widget.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-widget.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -206,7 +206,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Name attribute for $field_name
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_field_name( $field_name ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( false === $pos = strpos( $field_name, '[' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $pos = strpos( $field_name, '[' );
+ if ( false === $pos ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return 'widget-' . $this->id_base . '[' . $this->number . '][' . $field_name . ']';
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> return 'widget-' . $this->id_base . '[' . $this->number . '][' . substr_replace( $field_name, '][', $pos, strlen( '[' ) );
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpxmlrpcserverphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-xmlrpc-server.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-xmlrpc-server.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class-wp-xmlrpc-server.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -668,7 +668,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[0];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -1270,7 +1271,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $content_struct = $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -1672,7 +1674,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $post_id = (int) $args[3];
</span><span class="cx" style="display: block; padding: 0 10px"> $content_struct = $args[4];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -1744,7 +1747,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $post_id = (int) $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -1843,7 +1847,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPost' );
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -1903,7 +1908,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $fields = apply_filters( 'xmlrpc_default_post_fields', array( 'post', 'terms', 'custom_fields' ), 'wp.getPosts' );
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2001,7 +2007,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $content_struct = $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2105,7 +2112,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $term_id = (int) $args[3];
</span><span class="cx" style="display: block; padding: 0 10px"> $content_struct = $args[4];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2220,7 +2228,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $taxonomy = $args[3];
</span><span class="cx" style="display: block; padding: 0 10px"> $term_id = (int) $args[4];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2298,7 +2307,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $taxonomy = $args[3];
</span><span class="cx" style="display: block; padding: 0 10px"> $term_id = (int) $args[4];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2362,7 +2372,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $taxonomy = $args[3];
</span><span class="cx" style="display: block; padding: 0 10px"> $filter = isset( $args[4] ) ? $args[4] : 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">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2467,7 +2478,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomy' );
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2524,7 +2536,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $fields = apply_filters( 'xmlrpc_default_taxonomy_fields', array( 'labels', 'cap', 'object_type' ), 'wp.getTaxonomies' );
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2609,7 +2622,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUser' );
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2671,7 +2685,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getUsers' );
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2750,7 +2765,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $fields = apply_filters( 'xmlrpc_default_user_fields', array( 'all' ), 'wp.getProfile' );
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2799,7 +2815,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $content_struct = $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2878,7 +2895,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2925,7 +2943,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $num_pages = isset( $args[3] ) ? (int) $args[3] : 10;
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -2983,7 +3002,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $this->escape( $args[1] );
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $this->escape( $args[2] );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3019,7 +3039,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $page_id = (int) $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3085,7 +3106,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $escaped_username = $this->escape( $username );
</span><span class="cx" style="display: block; padding: 0 10px"> $escaped_password = $this->escape( $password );
</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 ( ! $user = $this->login( $escaped_username, $escaped_password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $escaped_username, $escaped_password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3143,7 +3165,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3203,7 +3226,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3246,7 +3270,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3259,7 +3284,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $tags = 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">- if ( $all_tags = get_tags() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $all_tags = get_tags();
+ if ( $all_tags ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( (array) $all_tags as $tag ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $struct = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $struct['tag_id'] = $tag->term_id;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3298,7 +3324,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $category = $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3380,7 +3407,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $category_id = (int) $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3432,7 +3460,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $category = $args[3];
</span><span class="cx" style="display: block; padding: 0 10px"> $max_results = (int) $args[4];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3481,7 +3510,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $comment_id = (int) $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3488,7 +3518,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'xmlrpc_call', 'wp.getComment' );
</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 ( ! $comment = get_comment( $comment_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment = get_comment( $comment_id );
+ if ( ! $comment ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 404, __( 'Invalid comment ID.' ) );
</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">@@ -3532,7 +3563,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $struct = isset( $args[3] ) ? $args[3] : 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">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3618,7 +3650,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $comment_ID = (int) $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3685,7 +3718,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $comment_ID = (int) $args[3];
</span><span class="cx" style="display: block; padding: 0 10px"> $content_struct = $args[4];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3917,7 +3951,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3953,7 +3988,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $post_id = (int) $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -3999,7 +4035,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4033,7 +4070,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4067,7 +4105,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4103,7 +4142,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $options = isset( $args[3] ) ? (array) $args[3] : 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">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4166,7 +4206,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $options = (array) $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4222,7 +4263,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $attachment_id = (int) $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4233,7 +4275,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'xmlrpc_call', 'wp.getMediaItem' );
</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 ( ! $attachment = get_post( $attachment_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $attachment = get_post( $attachment_id );
+ if ( ! $attachment ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 404, __( 'Invalid attachment ID.' ) );
</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">@@ -4273,7 +4316,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $struct = isset( $args[3] ) ? $args[3] : 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">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4328,7 +4372,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4411,7 +4456,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostType' );
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4467,7 +4513,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $fields = apply_filters( 'xmlrpc_default_posttype_fields', array( 'labels', 'cap', 'taxonomies' ), 'wp.getPostTypes' );
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4536,7 +4583,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $fields = apply_filters( 'xmlrpc_default_revision_fields', array( 'post_date', 'post_date_gmt' ), 'wp.getRevisions' );
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4543,7 +4591,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'xmlrpc_call', 'wp.getRevisions' );
</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 ( ! $post = get_post( $post_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post_id );
+ if ( ! $post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 404, __( 'Invalid post ID.' ) );
</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">@@ -4608,7 +4657,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $revision_id = (int) $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4615,7 +4665,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /** This action is documented in wp-includes/class-wp-xmlrpc-server.php */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'xmlrpc_call', 'wp.restoreRevision' );
</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 ( ! $revision = wp_get_post_revision( $revision_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $revision = wp_get_post_revision( $revision_id );
+ if ( ! $revision ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 404, __( 'Invalid post ID.' ) );
</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">@@ -4623,7 +4674,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 404, __( 'Invalid post ID.' ) );
</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 ( ! $post = get_post( $revision->post_parent ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $revision->post_parent );
+ if ( ! $post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 404, __( 'Invalid post ID.' ) );
</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">@@ -4675,7 +4727,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4756,7 +4809,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4800,7 +4854,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4861,7 +4916,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $query = array();
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -4954,7 +5010,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $content = $args[4];
</span><span class="cx" style="display: block; padding: 0 10px"> $publish = $args[5];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -5030,7 +5087,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $content = $args[4];
</span><span class="cx" style="display: block; padding: 0 10px"> $publish = $args[5];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -5103,7 +5161,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -5189,7 +5248,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $content_struct = $args[3];
</span><span class="cx" style="display: block; padding: 0 10px"> $publish = isset( $args[4] ) ? $args[4] : 0;
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -5431,7 +5491,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $postdata = compact( 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'to_ping', 'post_type', 'post_name', 'post_password', 'post_parent', 'menu_order', 'tags_input', 'page_template' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $post_ID = $postdata['ID'] = get_default_post_to_edit( $post_type, true )->ID;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post_ID = get_default_post_to_edit( $post_type, true )->ID;
+ $postdata['ID'] = $post_ID;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Only posts can be sticky
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5499,9 +5560,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function add_enclosure_if_new( $post_ID, $enclosure ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_array( $enclosure ) && isset( $enclosure['url'] ) && isset( $enclosure['length'] ) && isset( $enclosure['type'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $encstring = $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] . "\n";
- $found = false;
- if ( $enclosures = get_post_meta( $post_ID, 'enclosure' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $encstring = $enclosure['url'] . "\n" . $enclosure['length'] . "\n" . $enclosure['type'] . "\n";
+ $found = false;
+ $enclosures = get_post_meta( $post_ID, 'enclosure' );
+ if ( $enclosures ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $enclosures as $enc ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // This method used to omit the trailing new line. #23219
</span><span class="cx" style="display: block; padding: 0 10px"> if ( rtrim( $enc, "\n" ) == rtrim( $encstring, "\n" ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5565,7 +5627,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $content_struct = $args[3];
</span><span class="cx" style="display: block; padding: 0 10px"> $publish = isset( $args[4] ) ? $args[4] : 0;
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -5893,7 +5956,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -6038,7 +6102,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $query = array();
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -6158,7 +6223,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -6171,7 +6237,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $categories_struct = 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">- if ( $cats = get_categories( array( 'get' => 'all' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cats = get_categories( array( 'get' => 'all' ) );
+ if ( $cats ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $cats as $cat ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $struct = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $struct['categoryId'] = $cat->term_id;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6221,7 +6288,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $type = $data['type'];
</span><span class="cx" style="display: block; padding: 0 10px"> $bits = $data['bits'];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -6255,7 +6323,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $error Whether to pre-empt the media upload. Default 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">- if ( $upload_err = apply_filters( 'pre_upload_error', false ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $upload_err = apply_filters( 'pre_upload_error', false );
+ if ( $upload_err ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new IXR_Error( 500, $upload_err );
</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">@@ -6337,7 +6406,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $query = array();
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -6394,7 +6464,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -6407,12 +6478,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $categories_struct = 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">- if ( $cats = get_categories(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cats = get_categories(
</ins><span class="cx" style="display: block; padding: 0 10px"> array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'hide_empty' => 0,
</span><span class="cx" style="display: block; padding: 0 10px"> 'hierarchical' => 0,
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ );
+ if ( $cats ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $cats as $cat ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $struct = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $struct['categoryId'] = $cat->term_id;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6446,7 +6518,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -6500,7 +6573,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px"> $categories = $args[3];
</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 ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -6623,7 +6697,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $username = $args[1];
</span><span class="cx" style="display: block; padding: 0 10px"> $password = $args[2];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user = $this->login( $username, $password ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $this->login( $username, $password );
+ if ( ! $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $this->error;
</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">@@ -6702,7 +6777,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // FIXME: does url_to_postid() cover all these cases already?
</span><span class="cx" style="display: block; padding: 0 10px"> // if so, then let's use it and drop the old code.
</span><span class="cx" style="display: block; padding: 0 10px"> $urltest = parse_url( $pagelinkedto );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $post_ID = url_to_postid( $pagelinkedto ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post_ID = url_to_postid( $pagelinkedto );
+ if ( $post_ID ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // $way
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $urltest['path'] ) && preg_match( '#p/[0-9]{1,}#', $urltest['path'], $match ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // the path defines the post_ID (archives/p/XXXX)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6722,9 +6798,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $post_ID = preg_replace( '/[^0-9]+/', '', $urltest['fragment'] );
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( is_string( $urltest['fragment'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // ...or a string #title, a little more complicated
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $title = preg_replace( '/[^a-z0-9]/i', '.', $urltest['fragment'] );
- $sql = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title RLIKE %s", $title );
- if ( ! ( $post_ID = $wpdb->get_var( $sql ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $title = preg_replace( '/[^a-z0-9]/i', '.', $urltest['fragment'] );
+ $sql = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_title RLIKE %s", $title );
+ $post_ID = $wpdb->get_var( $sql );
+ if ( ! $post_ID ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // returning unknown error '0' is better than die()ing
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->pingback_error( 0, '' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6774,8 +6851,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ),
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $request = wp_safe_remote_get( $pagelinkedfrom, $http_api_args );
- $remote_source = $remote_source_original = wp_remote_retrieve_body( $request );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $request = wp_safe_remote_get( $pagelinkedfrom, $http_api_args );
+ $remote_source = wp_remote_retrieve_body( $request );
+ $remote_source_original = $remote_source;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $remote_source ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->pingback_error( 16, __( 'The source URL does not exist.' ) );
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpdependenciesphp"></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-dependencies.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class.wp-dependencies.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class.wp-dependencies.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -142,7 +142,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool True on success, false on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function all_deps( $handles, $recursion = false, $group = false ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $handles = (array) $handles ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $handles = (array) $handles;
+ if ( ! $handles ) {
</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="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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class.wp-scripts.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -196,7 +196,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool|string|void Void if no data exists, extra scripts if `$echo` is true, true otherwise.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function print_extra_script( $handle, $echo = true ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $output = $this->get_data( $handle, 'data' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $output = $this->get_data( $handle, 'data' );
+ if ( ! $output ) {
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -252,7 +253,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $src = $obj->src;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $cond_before = $cond_after = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cond_before = '';
+ $cond_after = '';
</ins><span class="cx" style="display: block; padding: 0 10px"> $conditional = isset( $obj->extra['conditional'] ) ? $obj->extra['conditional'] : '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $conditional ) {
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/class.wp-styles.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -144,7 +144,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $src = $obj->src;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $cond_before = $cond_after = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cond_before = '';
+ $cond_after = '';
</ins><span class="cx" style="display: block; padding: 0 10px"> $conditional = isset( $obj->extra['conditional'] ) ? $obj->extra['conditional'] : '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $conditional ) {
</span></span></pre></div>
<a id="trunksrcwpincludescommenttemplatephp"></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-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/comment-template.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/comment-template.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,7 +25,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $comment = get_comment( $comment_ID );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $comment->comment_author ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $comment->user_id && $user = get_userdata( $comment->user_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $comment->user_id ? get_userdata( $comment->user_id ) : false;
+ if ( $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $author = $user->display_name;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $author = __( 'Anonymous' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -148,7 +149,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int|WP_Comment $comment Optional. Comment ID or WP_Comment object. Default is the current comment.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function comment_author_email_link( $linktext = '', $before = '', $after = '', $comment = null ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $link = get_comment_author_email_link( $linktext, $before, $after, $comment ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $link = get_comment_author_email_link( $linktext, $before, $after, $comment );
+ if ( $link ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> echo $link;
</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">@@ -466,11 +468,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $classes[] = ( empty( $comment->comment_type ) ) ? 'comment' : $comment->comment_type;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Add classes for comment authors that are registered users.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $comment->user_id > 0 && $user = get_userdata( $comment->user_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = $comment->user_id ? get_userdata( $comment->user_id ) : false;
+ if ( $user ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $classes[] = 'byuser';
</span><span class="cx" style="display: block; padding: 0 10px"> $classes[] = 'comment-author-' . sanitize_html_class( $user->user_nicename, $comment->user_id );
</span><span class="cx" style="display: block; padding: 0 10px"> // For comment authors who are the author of the post
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $post = get_post( $post_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post_id );
+ if ( $post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $comment->user_id === $post->post_author ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $classes[] = 'bypostauthor';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1989,8 +1993,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $in_comment_loop = true;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_alt = $comment_thread_alt = 0;
- $comment_depth = 1;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_alt = 0;
+ $comment_thread_alt = 0;
+ $comment_depth = 1;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $defaults = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'walker' => null,
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/comment.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -48,7 +48,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $comment = apply_filters( 'comment_text', $comment, null, array() );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Check for the number of external links if a max allowed number is set.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $max_links = get_option( 'comment_max_links' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $max_links = get_option( 'comment_max_links' );
+ if ( $max_links ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $num_links = preg_match_all( '/<a [^>]*href/i', $comment, $out );
</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">@@ -1038,7 +1039,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $page = null;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $comment = get_comment( $comment_ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment = get_comment( $comment_ID );
+ if ( ! $comment ) {
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1359,7 +1361,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_delete_comment( $comment_id, $force_delete = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $comment = get_comment( $comment_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment = get_comment( $comment_id );
+ if ( ! $comment ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -1435,7 +1438,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return wp_delete_comment( $comment_id, 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 ( ! $comment = get_comment( $comment_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment = get_comment( $comment_id );
+ if ( ! $comment ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -2048,7 +2052,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $commentdata['user_ID'] ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID'];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $commentdata['user_ID'] = (int) $commentdata['user_ID'];
+ $commentdata['user_id'] = $commentdata['user_ID'];
</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"> $prefiltered_user_id = ( isset( $commentdata['user_id'] ) ) ? (int) $commentdata['user_id'] : 0;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2064,7 +2069,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID'];
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $commentdata['user_ID'] ) && $prefiltered_user_id !== (int) $commentdata['user_ID'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID'];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $commentdata['user_ID'] = (int) $commentdata['user_ID'];
+ $commentdata['user_id'] = $commentdata['user_ID'];
</ins><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $commentdata['user_id'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $commentdata['user_id'] = (int) $commentdata['user_id'];
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2475,7 +2481,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> wp_cache_delete( 'comments-0', 'counts' );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_cache_delete( "comments-{$post_id}", 'counts' );
</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 ( ! $post = get_post( $post_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post_id );
+ if ( ! $post ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -2774,7 +2781,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( (array) $post_links_temp as $link_test ) :
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! in_array( $link_test, $pung ) && ( url_to_postid( $link_test ) != $post->ID ) // If we haven't pung it already and it isn't a link to itself
</span><span class="cx" style="display: block; padding: 0 10px"> && ! is_local_attachment( $link_test ) ) : // Also, let's never ping local attachments.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $test = @parse_url( $link_test ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $test = @parse_url( $link_test );
+ if ( $test ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $test['query'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $post_links[] = $link_test;
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( isset( $test['path'] ) && ( $test['path'] != '/' ) && ( $test['path'] != '' ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3134,8 +3142,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_handle_comment_submission( $comment_data ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_post_ID = $comment_parent = $user_ID = 0;
- $comment_author = $comment_author_email = $comment_author_url = $comment_content = null;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_post_ID = 0;
+ $comment_parent = 0;
+ $user_ID = 0;
+ $comment_author = null;
+ $comment_author_email = null;
+ $comment_author_url = null;
+ $comment_content = null;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $comment_data['comment_post_ID'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $comment_post_ID = (int) $comment_data['comment_post_ID'];
</span></span></pre></div>
<a id="trunksrcwpincludescustomizeclasswpcustomizenavmenulocationcontrolphp"></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/customize/class-wp-customize-nav-menu-location-control.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/customize/class-wp-customize-nav-menu-location-control.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/customize/class-wp-customize-nav-menu-location-control.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -57,7 +57,8 @@
</span><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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $value_hidden_class = $no_value_hidden_class = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $value_hidden_class = '';
+ $no_value_hidden_class = '';
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $this->value() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $value_hidden_class = ' hidden';
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span></span></pre></div>
<a id="trunksrcwpincludesdatephp"></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/date.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/date.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/date.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -739,36 +739,39 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> // Specific value queries.
</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 ( isset( $query['year'] ) && $value = $this->build_value( $compare, $query['year'] ) ) {
- $where_parts[] = "YEAR( $column ) $compare $value";
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $date_units = array(
+ 'YEAR' => array( 'year' ),
+ 'MONTH' => array( 'month', 'monthnum' ),
+ '_wp_mysql_week' => array( 'week', 'w' ),
+ 'DAYOFYEAR' => array( 'dayofyear' ),
+ 'DAYOFMONTH' => array( 'day' ),
+ 'DAYOFWEEK' => array( 'dayofweek' ),
+ 'WEEKDAY' => array( 'dayofweek_iso' ),
+ );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( isset( $query['month'] ) && $value = $this->build_value( $compare, $query['month'] ) ) {
- $where_parts[] = "MONTH( $column ) $compare $value";
- } elseif ( isset( $query['monthnum'] ) && $value = $this->build_value( $compare, $query['monthnum'] ) ) {
- $where_parts[] = "MONTH( $column ) $compare $value";
- }
- if ( isset( $query['week'] ) && false !== ( $value = $this->build_value( $compare, $query['week'] ) ) ) {
- $where_parts[] = _wp_mysql_week( $column ) . " $compare $value";
- } elseif ( isset( $query['w'] ) && false !== ( $value = $this->build_value( $compare, $query['w'] ) ) ) {
- $where_parts[] = _wp_mysql_week( $column ) . " $compare $value";
- }
- if ( isset( $query['dayofyear'] ) && $value = $this->build_value( $compare, $query['dayofyear'] ) ) {
- $where_parts[] = "DAYOFYEAR( $column ) $compare $value";
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Check of the possible date units and add them to the query
+ foreach ( $date_units as $sql_part => $query_parts ) {
+ foreach ( $query_parts as $query_part ) {
+ if ( isset( $query[ $query_part ] ) ) {
+ $value = $this->build_value( $compare, $query[ $query_part ] );
+ if ( $value ) {
+ switch ( $sql_part ) {
+ case '_wp_mysql_week':
+ $where_parts[] = _wp_mysql_week( $column ) . " $compare $value";
+ break;
+ case 'WEEKDAY':
+ $where_parts[] = "$sql_part( $column ) + 1 $compare $value";
+ break;
+ default:
+ $where_parts[] = "$sql_part( $column ) $compare $value";
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( isset( $query['day'] ) && $value = $this->build_value( $compare, $query['day'] ) ) {
- $where_parts[] = "DAYOFMONTH( $column ) $compare $value";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ break;
+ }
+ }
+ }
</ins><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 ( isset( $query['dayofweek'] ) && $value = $this->build_value( $compare, $query['dayofweek'] ) ) {
- $where_parts[] = "DAYOFWEEK( $column ) $compare $value";
- }
-
- if ( isset( $query['dayofweek_iso'] ) && $value = $this->build_value( $compare, $query['dayofweek_iso'] ) ) {
- $where_parts[] = "WEEKDAY( $column ) + 1 $compare $value";
- }
-
</del><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $query['hour'] ) || isset( $query['minute'] ) || isset( $query['second'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Avoid notices.
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( array( 'hour', 'minute', 'second' ) as $unit ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -777,7 +780,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $time_query = $this->build_time_query( $column, $compare, $query['hour'], $query['minute'], $query['second'] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $time_query = $this->build_time_query( $column, $compare, $query['hour'], $query['minute'], $query['second'] );
+ if ( $time_query ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $where_parts[] = $time_query;
</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">@@ -969,15 +973,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( in_array( $compare, array( 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN' ) ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $return = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( isset( $hour ) && false !== ( $value = $this->build_value( $compare, $hour ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $value = $this->build_value( $compare, $hour );
+ if ( false !== $value ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $return[] = "HOUR( $column ) $compare $value";
</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 ( isset( $minute ) && false !== ( $value = $this->build_value( $compare, $minute ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $value = $this->build_value( $compare, $minute );
+ if ( false !== $value ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $return[] = "MINUTE( $column ) $compare $value";
</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 ( isset( $second ) && false !== ( $value = $this->build_value( $compare, $second ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $value = $this->build_value( $compare, $second );
+ if ( false !== $value ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $return[] = "SECOND( $column ) $compare $value";
</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">@@ -985,12 +992,21 @@
</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"> // Cases where just one unit is set
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( isset( $hour ) && ! isset( $minute ) && ! isset( $second ) && false !== ( $value = $this->build_value( $compare, $hour ) ) ) {
- return "HOUR( $column ) $compare $value";
- } elseif ( ! isset( $hour ) && isset( $minute ) && ! isset( $second ) && false !== ( $value = $this->build_value( $compare, $minute ) ) ) {
- return "MINUTE( $column ) $compare $value";
- } elseif ( ! isset( $hour ) && ! isset( $minute ) && isset( $second ) && false !== ( $value = $this->build_value( $compare, $second ) ) ) {
- return "SECOND( $column ) $compare $value";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( isset( $hour ) && ! isset( $minute ) && ! isset( $second ) ) {
+ $value = $this->build_value( $compare, $hour );
+ if ( false !== $value ) {
+ return "HOUR( $column ) $compare $value";
+ }
+ } elseif ( ! isset( $hour ) && isset( $minute ) && ! isset( $second ) ) {
+ $value = $this->build_value( $compare, $minute );
+ if ( false !== $value ) {
+ return "MINUTE( $column ) $compare $value";
+ }
+ } elseif ( ! isset( $hour ) && ! isset( $minute ) && isset( $second ) ) {
+ $value = $this->build_value( $compare, $second );
+ if ( false !== $value ) {
+ return "SECOND( $column ) $compare $value";
+ }
</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"> // Single units were already handled. Since hour & second isn't allowed, minute must to be set.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -998,7 +1014,8 @@
</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">- $format = $time = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $format = '';
+ $time = '';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Hour
</span><span class="cx" style="display: block; padding: 0 10px"> if ( null !== $hour ) {
</span></span></pre></div>
<a id="trunksrcwpincludesfeedatomcommentsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/feed-atom-comments.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/feed-atom-comments.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/feed-atom-comments.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -70,7 +70,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( have_comments() ) :
</span><span class="cx" style="display: block; padding: 0 10px"> while ( have_comments() ) :
</span><span class="cx" style="display: block; padding: 0 10px"> the_comment();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_post = get_post( $comment->comment_post_ID );
+ $GLOBALS['post'] = $comment_post;
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <entry>
</span><span class="cx" style="display: block; padding: 0 10px"> <title>
</span></span></pre></div>
<a id="trunksrcwpincludesfeedrss2commentsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/feed-rss2-comments.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/feed-rss2-comments.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/feed-rss2-comments.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -73,7 +73,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( have_comments() ) :
</span><span class="cx" style="display: block; padding: 0 10px"> while ( have_comments() ) :
</span><span class="cx" style="display: block; padding: 0 10px"> the_comment();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $comment_post = $GLOBALS['post'] = get_post( $comment->comment_post_ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $comment_post = get_post( $comment->comment_post_ID );
+ $GLOBALS['post'] = $comment_post;
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <item>
</span><span class="cx" style="display: block; padding: 0 10px"> <title>
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/formatting.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5851,7 +5851,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function maybe_hash_hex_color( $color ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $unhashed = sanitize_hex_color_no_hash( $color ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $unhashed = sanitize_hex_color_no_hash( $color );
+ if ( $unhashed ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return '#' . $unhashed;
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/functions.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -744,7 +744,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( (array) $post_links as $url ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $url != '' && ! $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE %s", $post_ID, $wpdb->esc_like( $url ) . '%' ) ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $headers = wp_get_http_headers( $url ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $headers = wp_get_http_headers( $url );
+ if ( $headers ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $len = isset( $headers['content-length'] ) ? (int) $headers['content-length'] : 0;
</span><span class="cx" style="display: block; padding: 0 10px"> $type = isset( $headers['content-type'] ) ? $headers['content-type'] : '';
</span><span class="cx" style="display: block; padding: 0 10px"> $allowed_types = array( 'video', 'audio' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -943,7 +944,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $frag = strstr( $uri, '#' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $frag = strstr( $uri, '#' );
+ if ( $frag ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $uri = substr( $uri, 0, -strlen( $frag ) );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $frag = '';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1698,7 +1700,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string Original referer field.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_original_referer_field( $echo = true, $jump_back_to = 'current' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $ref = wp_get_original_referer() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $ref = wp_get_original_referer();
+ if ( ! $ref ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $ref = 'previous' == $jump_back_to ? wp_get_referer() : wp_unslash( $_SERVER['REQUEST_URI'] );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $orig_referer_field = '<input type="hidden" name="_wp_original_http_referer" value="' . esc_attr( $ref ) . '" />';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1810,7 +1813,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Get the permission bits.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $stat = @stat( $target_parent ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $stat = @stat( $target_parent );
+ if ( $stat ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $dir_perms = $stat['mode'] & 0007777;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $dir_perms = 0777;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2159,7 +2163,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $dir = $upload_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 ( ! $url = get_option( 'upload_url_path' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $url = get_option( 'upload_url_path' );
+ if ( ! $url ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $upload_path ) || ( 'wp-content/uploads' == $upload_path ) || ( $upload_path == $dir ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $url = WP_CONTENT_URL . '/uploads';
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2599,7 +2604,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( in_array( $real_mime, $nonspecific_types, true ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // File is a non-specific binary type. That's ok if it's a type that generally tends to be binary.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! in_array( substr( $type, 0, strcspn( $type, '/' ) ), array( 'application', 'video', 'audio' ) ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $type = $ext = false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $type = false;
+ $ext = false;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( 0 === strpos( $real_mime, 'video/' ) || 0 === strpos( $real_mime, 'audio/' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2608,7 +2614,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * and some media files are commonly named with the wrong extension (.mov instead of .mp4)
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> if ( substr( $real_mime, 0, strcspn( $real_mime, '/' ) ) !== substr( $type, 0, strcspn( $type, '/' ) ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $type = $ext = false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $type = false;
+ $ext = false;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( 'text/plain' === $real_mime ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // A few common file types are occasionally detected as text/plain; allow those.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2623,7 +2630,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $type = $ext = false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $type = false;
+ $ext = false;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( 'text/rtf' === $real_mime ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Special casing for RTF files.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2636,7 +2644,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $type = $ext = false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $type = false;
+ $ext = false;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $type !== $real_mime ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2644,7 +2653,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Everything else including image/* and application/*:
</span><span class="cx" style="display: block; padding: 0 10px"> * If the real content type doesn't match the file extension, assume it's dangerous.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $type = $ext = false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $type = false;
+ $ext = false;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2654,7 +2664,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $allowed = get_allowed_mime_types();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! in_array( $type, $allowed ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $type = $ext = false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $type = false;
+ $ext = false;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5237,7 +5248,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return float|false Timezone GMT offset, false otherwise.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_timezone_override_offset() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $timezone_string = get_option( 'timezone_string' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $timezone_string = get_option( 'timezone_string' );
+ if ( ! $timezone_string ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -5602,7 +5614,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $extra_context_headers Empty array by default.
</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 ( $context && $extra_headers = apply_filters( "extra_{$context}_headers", array() ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $extra_headers = $context ? apply_filters( "extra_{$context}_headers", array() ) : array();
+ if ( $extra_headers ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $extra_headers = array_combine( $extra_headers, $extra_headers ); // keys equal values
</span><span class="cx" style="display: block; padding: 0 10px"> $all_headers = array_merge( $extra_headers, (array) $default_headers );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5726,7 +5739,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string SQL clause.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function _wp_mysql_week( $column ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- switch ( $start_of_week = (int) get_option( 'start_of_week' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $start_of_week = (int) get_option( 'start_of_week' );
+ switch ( $start_of_week ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> case 1:
</span><span class="cx" style="display: block; padding: 0 10px"> return "WEEK( $column, 1 )";
</span><span class="cx" style="display: block; padding: 0 10px"> case 2:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5757,7 +5771,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_find_hierarchy_loop( $callback, $start, $start_parent, $callback_args = array() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $override = is_null( $start_parent ) ? array() : array( $start => $start_parent );
</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 ( ! $arbitrary_loop_member = wp_find_hierarchy_loop_tortoise_hare( $callback, $start, $override, $callback_args ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $arbitrary_loop_member = wp_find_hierarchy_loop_tortoise_hare( $callback, $start, $override, $callback_args );
+ if ( ! $arbitrary_loop_member ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return array();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5785,8 +5800,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * $_return_loop
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_find_hierarchy_loop_tortoise_hare( $callback, $start, $override = array(), $callback_args = array(), $_return_loop = false ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $tortoise = $hare = $evanescent_hare = $start;
- $return = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $tortoise = $start;
+ $hare = $start;
+ $evanescent_hare = $start;
+ $return = array();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Set evanescent_hare to one past hare
</span><span class="cx" style="display: block; padding: 0 10px"> // Increment hare two steps
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5798,7 +5815,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ( $hare = isset( $override[ $evanescent_hare ] ) ? $override[ $evanescent_hare ] : call_user_func_array( $callback, array_merge( array( $evanescent_hare ), $callback_args ) ) )
</span><span class="cx" style="display: block; padding: 0 10px"> ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $_return_loop ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $return[ $tortoise ] = $return[ $evanescent_hare ] = $return[ $hare ] = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $return[ $tortoise ] = true;
+ $return[ $evanescent_hare ] = true;
+ $return[ $hare ] = true;
</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"> // tortoise got lapped - must be a loop
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -7133,7 +7152,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $handle = opendir( $directory ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $handle = opendir( $directory );
+ if ( $handle ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> while ( ( $file = readdir( $handle ) ) !== false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $path = $directory . '/' . $file;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $file != '.' && $file != '..' ) {
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/general-template.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1080,7 +1080,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $title['title'] = single_term_title( '', false );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If on an author archive, use the author's display name.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( is_author() && $author = get_queried_object() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } elseif ( is_author() && get_queried_object() ) {
+ $author = get_queried_object();
</ins><span class="cx" style="display: block; padding: 0 10px"> $title['title'] = $author->display_name;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If it's a date archive, use the date as the title.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1874,10 +1875,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $limit = $r['limit'];
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'monthly' == $r['type'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date $order $limit";
- $key = md5( $query );
- $key = "wp_get_archives:$key:$last_changed";
- if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date $order $limit";
+ $key = md5( $query );
+ $key = "wp_get_archives:$key:$last_changed";
+ $results = wp_cache_get( $key, 'posts' );
+ if ( ! $results ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $results = $wpdb->get_results( $query );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_cache_set( $key, $results, 'posts' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1898,10 +1900,11 @@
</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"> } elseif ( 'yearly' == $r['type'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $query = "SELECT YEAR(post_date) AS `year`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date) ORDER BY post_date $order $limit";
- $key = md5( $query );
- $key = "wp_get_archives:$key:$last_changed";
- if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $query = "SELECT YEAR(post_date) AS `year`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date) ORDER BY post_date $order $limit";
+ $key = md5( $query );
+ $key = "wp_get_archives:$key:$last_changed";
+ $results = wp_cache_get( $key, 'posts' );
+ if ( ! $results ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $results = $wpdb->get_results( $query );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_cache_set( $key, $results, 'posts' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1921,10 +1924,11 @@
</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"> } elseif ( 'daily' == $r['type'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, DAYOFMONTH(post_date) AS `dayofmonth`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) ORDER BY post_date $order $limit";
- $key = md5( $query );
- $key = "wp_get_archives:$key:$last_changed";
- if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $query = "SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, DAYOFMONTH(post_date) AS `dayofmonth`, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date), DAYOFMONTH(post_date) ORDER BY post_date $order $limit";
+ $key = md5( $query );
+ $key = "wp_get_archives:$key:$last_changed";
+ $results = wp_cache_get( $key, 'posts' );
+ if ( ! $results ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $results = $wpdb->get_results( $query );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_cache_set( $key, $results, 'posts' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1945,11 +1949,12 @@
</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"> } elseif ( 'weekly' == $r['type'] ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $week = _wp_mysql_week( '`post_date`' );
- $query = "SELECT DISTINCT $week AS `week`, YEAR( `post_date` ) AS `yr`, DATE_FORMAT( `post_date`, '%Y-%m-%d' ) AS `yyyymmdd`, count( `ID` ) AS `posts` FROM `$wpdb->posts` $join $where GROUP BY $week, YEAR( `post_date` ) ORDER BY `post_date` $order $limit";
- $key = md5( $query );
- $key = "wp_get_archives:$key:$last_changed";
- if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $week = _wp_mysql_week( '`post_date`' );
+ $query = "SELECT DISTINCT $week AS `week`, YEAR( `post_date` ) AS `yr`, DATE_FORMAT( `post_date`, '%Y-%m-%d' ) AS `yyyymmdd`, count( `ID` ) AS `posts` FROM `$wpdb->posts` $join $where GROUP BY $week, YEAR( `post_date` ) ORDER BY `post_date` $order $limit";
+ $key = md5( $query );
+ $key = "wp_get_archives:$key:$last_changed";
+ $results = wp_cache_get( $key, 'posts' );
+ if ( ! $results ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $results = $wpdb->get_results( $query );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_cache_set( $key, $results, 'posts' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1987,7 +1992,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $query = "SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit";
</span><span class="cx" style="display: block; padding: 0 10px"> $key = md5( $query );
</span><span class="cx" style="display: block; padding: 0 10px"> $key = "wp_get_archives:$key:$last_changed";
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $results = wp_cache_get( $key, 'posts' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $results = wp_cache_get( $key, 'posts' );
+ if ( ! $results ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $results = $wpdb->get_results( $query );
</span><span class="cx" style="display: block; padding: 0 10px"> wp_cache_set( $key, $results, 'posts' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3830,7 +3836,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $attributes[] = 'dir="rtl"';
</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 ( $lang = get_bloginfo( 'language' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $lang = get_bloginfo( 'language' );
+ if ( $lang ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( get_option( 'html_type' ) == 'text/html' || $doctype == 'html' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $attributes[] = 'lang="' . esc_attr( $lang ) . '"';
</span><span class="cx" style="display: block; padding: 0 10px"> }
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/kses.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1173,7 +1173,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $allowed_attr[ $match[0] ] = $allowed_attr['data-*'];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $name = $value = $whole = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $name = '';
+ $value = '';
+ $whole = '';
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -1182,7 +1184,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $new_value = safecss_filter_attr( $value );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $new_value ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $name = $value = $whole = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $name = '';
+ $value = '';
+ $whole = '';
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -1194,7 +1198,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // there are some checks
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $allowed_attr[ $name_low ] as $currkey => $currval ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! wp_kses_check_attr_val( $value, $vless, $currkey, $currval ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $name = $value = $whole = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $name = '';
+ $value = '';
+ $whole = '';
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -1235,7 +1241,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> case 0:
</span><span class="cx" style="display: block; padding: 0 10px"> if ( preg_match( '/^([-a-zA-Z:]+)/', $attr, $match ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $attrname = $match[1];
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $working = $mode = 1;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $working = 1;
+ $mode = 1;
</ins><span class="cx" style="display: block; padding: 0 10px"> $attr = preg_replace( '/^[-a-zA-Z:]+/', '', $attr );
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/l10n.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,8 +53,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // If multisite, check options.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_multisite() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Don't check blog option when installing.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( wp_installing() || ( false === $ms_locale = get_option( 'WPLANG' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( wp_installing() ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $ms_locale = get_site_option( 'WPLANG' );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } else {
+ $ms_locale = get_option( 'WPLANG' );
+ if ( false === $ms_locale ) {
+ $ms_locale = get_site_option( 'WPLANG' );
+ }
</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"> if ( $ms_locale !== false ) {
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/link-template.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1197,7 +1197,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_post_type_archive_link( $post_type ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_rewrite;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post_type_obj = get_post_type_object( $post_type ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ $post_type_obj = get_post_type_object( $post_type );
+ if ( ! $post_type_obj ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -1256,7 +1258,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $feed = $default_feed;
</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 ( ! $link = get_post_type_archive_link( $post_type ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $link = get_post_type_archive_link( $post_type );
+ if ( ! $link ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -1338,7 +1341,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * not allow an editing UI.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_edit_post_link( $id = 0, $context = 'display' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $id );
+ if ( ! $post ) {
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1391,11 +1395,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $class Optional. Add custom class to link. Default 'post-edit-link'.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function edit_post_link( $text = null, $before = '', $after = '', $id = 0, $class = 'post-edit-link' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $id );
+ if ( ! $post ) {
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $url = get_edit_post_link( $post->ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $url = get_edit_post_link( $post->ID );
+ if ( ! $url ) {
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1434,7 +1440,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> _deprecated_argument( __FUNCTION__, '3.0.0' );
</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 ( ! $post = get_post( $id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $id );
+ if ( ! $post ) {
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1677,7 +1684,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ( ! $post = get_post() ) || ! taxonomy_exists( $taxonomy ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post();
+ if ( ! $post || ! taxonomy_exists( $taxonomy ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return null;
</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">@@ -1859,7 +1867,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|void The adjacent post relational link URL.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_adjacent_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $previous && is_attachment() && $post = get_post() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post();
+ if ( $previous && is_attachment() && $post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $post = get_post( $post->post_parent );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $post = get_adjacent_post( $in_same_term, $excluded_terms, $previous, $taxonomy );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4083,7 +4092,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $email_hash = '';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $user = $email = false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = false;
+ $email = false;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_object( $id_or_email ) && isset( $id_or_email->comment_ID ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $id_or_email = get_comment( $id_or_email );
</span></span></pre></div>
<a id="trunksrcwpincludesloadphp"></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/load.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/load.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/load.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -109,7 +109,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Fix empty PHP_SELF
</span><span class="cx" style="display: block; padding: 0 10px"> $PHP_SELF = $_SERVER['PHP_SELF'];
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $PHP_SELF ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace( '/(\?.*)?$/', '', $_SERVER['REQUEST_URI'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $_SERVER['PHP_SELF'] = preg_replace( '/(\?.*)?$/', '', $_SERVER['REQUEST_URI'] );
+ $PHP_SELF = $_SERVER['PHP_SELF'];
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -634,7 +635,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_dir( WPMU_PLUGIN_DIR ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return $mu_plugins;
</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 ( ! $dh = opendir( WPMU_PLUGIN_DIR ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $dh = opendir( WPMU_PLUGIN_DIR );
+ if ( ! $dh ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $mu_plugins;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> while ( ( $plugin = readdir( $dh ) ) !== false ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1164,7 +1166,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // General libraries
</span><span class="cx" style="display: block; padding: 0 10px"> require_once ABSPATH . WPINC . '/plugin.php';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $locales = $locations = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $locales = array();
+ $locations = array();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> while ( true ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( defined( 'WPLANG' ) ) {
</span></span></pre></div>
<a id="trunksrcwpincludesmetaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/meta.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/meta.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/meta.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -699,7 +699,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Fetch the meta and go on if it's found.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $meta = get_metadata_by_mid( $meta_type, $meta_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $meta = get_metadata_by_mid( $meta_type, $meta_id );
+ if ( $meta ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $original_key = $meta->meta_key;
</span><span class="cx" style="display: block; padding: 0 10px"> $object_id = $meta->{$column};
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -811,7 +812,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Fetch the meta and go on if it's found.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $meta = get_metadata_by_mid( $meta_type, $meta_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $meta = get_metadata_by_mid( $meta_type, $meta_id );
+ if ( $meta ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $object_id = (int) $meta->{$column};
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /** This action is documented in wp-includes/meta.php */
</span></span></pre></div>
<a id="trunksrcwpincludesmsfunctionsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/ms-functions.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/ms-functions.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/ms-functions.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2024,21 +2024,24 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since MU (3.0.0)
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function maybe_redirect_404() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /**
- * Filters the redirect URL for 404s on the main site.
- *
- * The filter is only evaluated if the NOBLOGREDIRECT constant is defined.
- *
- * @since 3.0.0
- *
- * @param string $no_blog_redirect The redirect URL defined in NOBLOGREDIRECT.
- */
- if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && ( $destination = apply_filters( 'blog_redirect_404', NOBLOGREDIRECT ) ) ) {
- if ( $destination == '%siteurl%' ) {
- $destination = network_home_url();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) ) {
+ /**
+ * Filters the redirect URL for 404s on the main site.
+ *
+ * The filter is only evaluated if the NOBLOGREDIRECT constant is defined.
+ *
+ * @since 3.0.0
+ *
+ * @param string $no_blog_redirect The redirect URL defined in NOBLOGREDIRECT.
+ */
+ $destination = apply_filters( 'blog_redirect_404', NOBLOGREDIRECT );
+ if ( $destination ) {
+ if ( $destination == '%siteurl%' ) {
+ $destination = network_home_url();
+ }
+ wp_redirect( $destination );
+ exit();
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp_redirect( $destination );
- exit();
</del><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="trunksrcwpincludesmsloadphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/ms-load.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/ms-load.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/ms-load.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -324,7 +324,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * If we're not dealing with one of these installations, then the important part is determining
</span><span class="cx" style="display: block; padding: 0 10px"> * the network first, because we need the network's path to identify any sites.
</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 ( ! $current_site = wp_cache_get( 'current_network', 'site-options' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $current_site = wp_cache_get( 'current_network', 'site-options' );
+ if ( ! $current_site ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Are there even two networks installed?
</span><span class="cx" style="display: block; padding: 0 10px"> $networks = get_networks( array( 'number' => 2 ) );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( count( $networks ) === 1 ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -388,7 +389,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // During activation of a new subdomain, the requested site does not yet exist.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $current_blog ) && wp_installing() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $current_blog = new stdClass;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $current_blog->blog_id = $blog_id = 1;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $current_blog->blog_id = 1;
+ $blog_id = 1;
</ins><span class="cx" style="display: block; padding: 0 10px"> $current_blog->public = 1;
</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="trunksrcwpincludesnavmenutemplatephp"></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/nav-menu-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/nav-menu-template.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/nav-menu-template.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -116,7 +116,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $menu = wp_get_nav_menu_object( $args->menu );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Get the nav menu based on the theme_location
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $menu && $args->theme_location && ( $locations = get_nav_menu_locations() ) && isset( $locations[ $args->theme_location ] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $locations = get_nav_menu_locations();
+ if ( ! $menu && $args->theme_location && $locations && isset( $locations[ $args->theme_location ] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $menu = wp_get_nav_menu_object( $locations[ $args->theme_location ] );
</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">@@ -124,7 +125,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $menu && ! $args->theme_location ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $menus = wp_get_nav_menus();
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $menus as $menu_maybe ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $menu_items = wp_get_nav_menu_items( $menu_maybe->term_id, array( 'update_post_term_cache' => false ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $menu_items = wp_get_nav_menu_items( $menu_maybe->term_id, array( 'update_post_term_cache' => false ) );
+ if ( $menu_items ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $menu = $menu_maybe;
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -157,7 +159,8 @@
</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">- $nav_menu = $items = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $nav_menu = '';
+ $items = '';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $show_container = false;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $args->container ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -181,7 +184,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Set up the $menu_item variables
</span><span class="cx" style="display: block; padding: 0 10px"> _wp_menu_item_classes_by_context( $menu_items );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $sorted_menu_items = $menu_items_with_children = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $sorted_menu_items = array();
+ $menu_items_with_children = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( (array) $menu_items as $menu_item ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $sorted_menu_items[ $menu_item->menu_order ] = $menu_item;
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $menu_item->menu_item_parent ) {
</span></span></pre></div>
<a id="trunksrcwpincludesoptionphp"></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/option.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/option.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/option.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -198,8 +198,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $alloptions ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $suppress = $wpdb->suppress_errors();
- if ( ! $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $suppress = $wpdb->suppress_errors();
+ $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" );
+ if ( ! $alloptions_db ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $wpdb->suppress_errors( $suppress );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -913,7 +914,8 @@
</span><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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user_id = get_current_user_id() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_id = get_current_user_id();
+ if ( ! $user_id ) {
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1035,7 +1037,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function get_all_user_settings() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $_updated_user_settings;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user_id = get_current_user_id() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_id = get_current_user_id();
+ if ( ! $user_id ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return array();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1078,7 +1081,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_set_all_user_settings( $user_settings ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $_updated_user_settings;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user_id = get_current_user_id() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_id = get_current_user_id();
+ if ( ! $user_id ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -1111,7 +1115,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.7.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function delete_all_user_settings() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $user_id = get_current_user_id() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_id = get_current_user_id();
+ if ( ! $user_id ) {
</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="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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/pluggable.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -217,7 +217,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Headers
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $cc = $bcc = $reply_to = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cc = array();
+ $bcc = array();
+ $reply_to = array();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $headers ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $headers = array();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -595,7 +597,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return false|int False if invalid cookie, User ID if valid.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_validate_auth_cookie( $cookie = '', $scheme = '' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $cookie_elements = wp_parse_auth_cookie( $cookie, $scheme ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cookie_elements = wp_parse_auth_cookie( $cookie, $scheme );
+ if ( ! $cookie_elements ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Fires if an authentication cookie is malformed.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -609,11 +612,12 @@
</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">- $scheme = $cookie_elements['scheme'];
- $username = $cookie_elements['username'];
- $hmac = $cookie_elements['hmac'];
- $token = $cookie_elements['token'];
- $expired = $expiration = $cookie_elements['expiration'];
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $scheme = $cookie_elements['scheme'];
+ $username = $cookie_elements['username'];
+ $hmac = $cookie_elements['hmac'];
+ $token = $cookie_elements['token'];
+ $expired = $cookie_elements['expiration'];
+ $expiration = $cookie_elements['expiration'];
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Allow a grace period for POST and Ajax requests
</span><span class="cx" style="display: block; padding: 0 10px"> if ( wp_doing_ajax() || 'POST' == $_SERVER['REQUEST_METHOD'] ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1036,7 +1040,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $scheme = apply_filters( 'auth_redirect_scheme', '' );
</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 ( $user_id = wp_validate_auth_cookie( '', $scheme ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_id = wp_validate_auth_cookie( '', $scheme );
+ if ( $user_id ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Fires before the authentication redirect.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1380,7 +1385,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // In php 5 parse_url may fail if the URL query part contains http://, bug #38143
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $test = ( $cut = strpos( $location, '?' ) ) ? substr( $location, 0, $cut ) : $location;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cut = strpos( $location, '?' );
+ $test = $cut ? substr( $location, 0, $cut ) : $location;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // @-operator is used to prevent possible warnings in PHP < 5.3.3.
</span><span class="cx" style="display: block; padding: 0 10px"> $lp = @parse_url( $test );
</span></span></pre></div>
<a id="trunksrcwpincludespomopluralformsphp"></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/pomo/plural-forms.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/pomo/plural-forms.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/pomo/plural-forms.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -240,7 +240,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $this->cache[ $num ] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->cache[ $num ];
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return $this->cache[ $num ] = $this->execute( $num );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->cache[ $num ] = $this->execute( $num );
+ return $this->cache[ $num ];
</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="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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/post-template.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1095,7 +1095,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @internal This will probably change at some point...
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function the_meta() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $keys = get_post_custom_keys() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $keys = get_post_custom_keys();
+ if ( $keys ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $li_html = '';
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( (array) $keys as $key ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $keyt = trim( $key );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1603,10 +1604,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = false, $icon = false, $text = false, $attr = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $_post = get_post( $id );
</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( $_post ) || ( 'attachment' !== $_post->post_type ) || ! $url = wp_get_attachment_url( $_post->ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( empty( $_post ) || ( 'attachment' !== $_post->post_type ) || ! wp_get_attachment_url( $_post->ID ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return __( 'Missing Attachment' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $url = wp_get_attachment_url( $_post->ID );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( $permalink ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $url = get_attachment_link( $_post->ID );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1807,7 +1810,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|false i18n formatted datetimestamp or localized 'Current Revision'.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_post_revision_title( $revision, $link = true ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $revision = get_post( $revision ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $revision = get_post( $revision );
+ if ( ! $revision ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $revision;
</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">@@ -1822,9 +1826,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: revision date */
</span><span class="cx" style="display: block; padding: 0 10px"> $currentf = __( '%s [Current Revision]' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $date = date_i18n( $datef, strtotime( $revision->post_modified ) );
- if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) ) {
- $date = "<a href='$link'>$date</a>";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $date = date_i18n( $datef, strtotime( $revision->post_modified ) );
+ $edit_link = get_edit_post_link( $revision->ID );
+ if ( $link && current_user_can( 'edit_post', $revision->ID ) && $edit_link ) {
+ $date = "<a href='$edit_link'>$date</a>";
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! wp_is_post_revision( $revision ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1846,7 +1851,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|false gravatar, user, i18n formatted datetimestamp or localized 'Current Revision'.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_post_revision_title_expanded( $revision, $link = true ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $revision = get_post( $revision ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $revision = get_post( $revision );
+ if ( ! $revision ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $revision;
</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">@@ -1860,9 +1866,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $gravatar = get_avatar( $revision->post_author, 24 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $date = date_i18n( $datef, strtotime( $revision->post_modified ) );
- if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) ) {
- $date = "<a href='$link'>$date</a>";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $date = date_i18n( $datef, strtotime( $revision->post_modified ) );
+ $edit_link = get_edit_post_link( $revision->ID );
+ if ( $link && current_user_can( 'edit_post', $revision->ID ) && $edit_link ) {
+ $date = "<a href='$edit_link'>$date</a>";
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $revision_date_author = sprintf(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1910,7 +1917,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $type 'all' (default), 'revision' or 'autosave'
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_list_post_revisions( $post_id = 0, $type = 'all' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $post_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post_id );
+ if ( ! $post ) {
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1920,7 +1928,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> _deprecated_argument( __FUNCTION__, '3.6.0' );
</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 ( ! $revisions = wp_get_post_revisions( $post->ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $revisions = wp_get_post_revisions( $post->ID );
+ if ( ! $revisions ) {
</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="trunksrcwpincludespostthumbnailtemplatephp"></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-thumbnail-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/post-thumbnail-template.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/post-thumbnail-template.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -98,7 +98,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $thumb_ids = array();
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $wp_query->posts as $post ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $id = get_post_thumbnail_id( $post->ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $id = get_post_thumbnail_id( $post->ID );
+ if ( $id ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $thumb_ids[] = $id;
</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="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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/post.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -453,8 +453,11 @@
</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 ) && ( ( $uploads = wp_get_upload_dir() ) && false === $uploads['error'] ) ) {
- $file = $uploads['basedir'] . "/$file";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $file && 0 !== strpos( $file, '/' ) && ! preg_match( '|^.:\\\|', $file ) ) {
+ $uploads = wp_get_upload_dir();
+ if ( false === $uploads['error'] ) {
+ $file = $uploads['basedir'] . "/$file";
+ }
</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"> if ( $unfiltered ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -499,7 +502,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $file = apply_filters( 'update_attached_file', $file, $attachment_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $file = _wp_relative_upload_path( $file ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $file = _wp_relative_upload_path( $file );
+ if ( $file ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return update_post_meta( $attachment_id, '_wp_attached_file', $file );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> return delete_post_meta( $attachment_id, '_wp_attached_file' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -755,7 +759,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $ancestors = 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">- $id = $ancestors[] = $post->post_parent;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $id = $post->post_parent;
+ $ancestors[] = $id;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> while ( $ancestor = get_post( $id ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Loop detection: If the ancestor has been seen before, break.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -763,7 +768,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</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">- $id = $ancestors[] = $ancestor->post_parent;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $id = $ancestor->post_parent;
+ $ancestors[] = $id;
</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"> return $ancestors;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1148,7 +1154,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|false Post type on success, false on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_post_type( $post = null ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $post = get_post( $post ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post );
+ if ( $post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $post->post_type;
</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">@@ -2154,7 +2161,8 @@
</span><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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $keys = array_keys( $custom ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $keys = array_keys( $custom );
+ if ( $keys ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $keys;
</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">@@ -4051,7 +4059,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_publish_post( $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $post ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post );
+ if ( ! $post ) {
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4227,22 +4236,26 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Prevent new post slugs that could result in URLs that conflict with date archives.
</span><span class="cx" style="display: block; padding: 0 10px"> $post = get_post( $post_ID );
</span><span class="cx" style="display: block; padding: 0 10px"> $conflicts_with_date_archive = false;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'post' === $post_type && ( ! $post || $post->post_name !== $slug ) && preg_match( '/^[0-9]+$/', $slug ) && $slug_num = intval( $slug ) ) {
- $permastructs = array_values( array_filter( explode( '/', get_option( 'permalink_structure' ) ) ) );
- $postname_index = array_search( '%postname%', $permastructs );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'post' === $post_type && ( ! $post || $post->post_name !== $slug ) && preg_match( '/^[0-9]+$/', $slug ) ) {
+ $slug_num = intval( $slug );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /*
- * Potential date clashes are as follows:
- *
- * - Any integer in the first permastruct position could be a year.
- * - An integer between 1 and 12 that follows 'year' conflicts with 'monthnum'.
- * - An integer between 1 and 31 that follows 'monthnum' conflicts with 'day'.
- */
- if ( 0 === $postname_index ||
- ( $postname_index && '%year%' === $permastructs[ $postname_index - 1 ] && 13 > $slug_num ) ||
- ( $postname_index && '%monthnum%' === $permastructs[ $postname_index - 1 ] && 32 > $slug_num )
- ) {
- $conflicts_with_date_archive = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( $slug_num ) {
+ $permastructs = array_values( array_filter( explode( '/', get_option( 'permalink_structure' ) ) ) );
+ $postname_index = array_search( '%postname%', $permastructs );
+
+ /*
+ * Potential date clashes are as follows:
+ *
+ * - Any integer in the first permastruct position could be a year.
+ * - An integer between 1 and 12 that follows 'year' conflicts with 'monthnum'.
+ * - An integer between 1 and 31 that follows 'monthnum' conflicts with 'day'.
+ */
+ if ( 0 === $postname_index ||
+ ( $postname_index && '%year%' === $permastructs[ $postname_index - 1 ] && 13 > $slug_num ) ||
+ ( $postname_index && '%monthnum%' === $permastructs[ $postname_index - 1 ] && 32 > $slug_num )
+ ) {
+ $conflicts_with_date_archive = true;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5320,7 +5333,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( strpos( $url, home_url( '/?attachment_id=' ) ) !== false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return true;
</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 ( $id = url_to_postid( $url ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ $id = url_to_postid( $url );
+ if ( $id ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $post = get_post( $id );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'attachment' == $post->post_type ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5544,7 +5559,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_attachment_metadata( $attachment_id = 0, $unfiltered = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $attachment_id = (int) $attachment_id;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $attachment_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $attachment_id );
+ if ( ! $post ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -5577,7 +5593,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_update_attachment_metadata( $attachment_id, $data ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $attachment_id = (int) $attachment_id;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $attachment_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $attachment_id );
+ if ( ! $post ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -5589,7 +5606,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $data Array of updated attachment meta data.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $attachment_id Attachment post ID.
</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 ( $data = apply_filters( 'wp_update_attachment_metadata', $data, $post->ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $data = apply_filters( 'wp_update_attachment_metadata', $data, $post->ID );
+ if ( $data ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return update_post_meta( $post->ID, '_wp_attachment_metadata', $data );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> return delete_post_meta( $post->ID, '_wp_attachment_metadata' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5608,7 +5626,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_attachment_url( $attachment_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $attachment_id = (int) $attachment_id;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $attachment_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $attachment_id );
+ if ( ! $post ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -5618,9 +5637,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $url = '';
</span><span class="cx" style="display: block; padding: 0 10px"> // Get attached file.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $file = get_post_meta( $post->ID, '_wp_attached_file', true ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $file = get_post_meta( $post->ID, '_wp_attached_file', true );
+ if ( $file ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Get upload directory.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ( $uploads = wp_get_upload_dir() ) && false === $uploads['error'] ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $uploads = wp_get_upload_dir();
+ if ( $uploads && false === $uploads['error'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Check that the upload base exists in the file location.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 0 === strpos( $file, $uploads['basedir'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Replace file location with url location.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5675,7 +5696,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_attachment_caption( $post_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $post_id = (int) $post_id;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $post_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post_id );
+ if ( ! $post ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -5706,25 +5728,31 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_attachment_thumb_file( $post_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $post_id = (int) $post_id;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $post_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post_id );
+ if ( ! $post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return 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">- if ( ! is_array( $imagedata = wp_get_attachment_metadata( $post->ID ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ $imagedata = wp_get_attachment_metadata( $post->ID );
+ if ( ! is_array( $imagedata ) ) {
</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"> $file = get_attached_file( $post->ID );
</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( $imagedata['thumb'] ) && ( $thumbfile = str_replace( wp_basename( $file ), $imagedata['thumb'], $file ) ) && file_exists( $thumbfile ) ) {
- /**
- * Filters the attachment thumbnail file path.
- *
- * @since 2.1.0
- *
- * @param string $thumbfile File path to the attachment thumbnail.
- * @param int $post_id Attachment ID.
- */
- return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! empty( $imagedata['thumb'] ) ) {
+ $thumbfile = str_replace( wp_basename( $file ), $imagedata['thumb'], $file );
+ if ( file_exists( $thumbfile ) ) {
+ /**
+ * Filters the attachment thumbnail file path.
+ *
+ * @since 2.1.0
+ *
+ * @param string $thumbfile File path to the attachment thumbnail.
+ * @param int $post_id Attachment ID.
+ */
+ return apply_filters( 'wp_get_attachment_thumb_file', $thumbfile, $post->ID );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5739,10 +5767,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_attachment_thumb_url( $post_id = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $post_id = (int) $post_id;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $post_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post_id );
+ if ( ! $post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return 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">- if ( ! $url = wp_get_attachment_url( $post->ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+ $url = wp_get_attachment_url( $post->ID );
+ if ( ! $url ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -5751,7 +5782,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $sized[0];
</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 ( ! $thumb = wp_get_attachment_thumb_file( $post->ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $thumb = wp_get_attachment_thumb_file( $post->ID );
+ if ( ! $thumb ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -5778,11 +5810,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool True if one of the accepted types, false otherwise.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_attachment_is( $type, $post = null ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $post ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post );
+ if ( ! $post ) {
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $file = get_attached_file( $post->ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $file = get_attached_file( $post->ID );
+ if ( ! $file ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -5853,13 +5887,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $post_mimes = array();
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_numeric( $mime ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $mime = (int) $mime;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $post = get_post( $mime ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $mime );
+ if ( $post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $post_id = (int) $post->ID;
</span><span class="cx" style="display: block; padding: 0 10px"> $file = get_attached_file( $post_id );
</span><span class="cx" style="display: block; padding: 0 10px"> $ext = preg_replace( '/^.+?\.([^.]+)$/', '$1', $file );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $ext ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $post_mimes[] = $ext;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $ext_type = wp_ext2type( $ext ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $ext_type = wp_ext2type( $ext );
+ if ( $ext_type ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $post_mimes[] = $ext_type;
</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">@@ -5905,7 +5941,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $keys = array_keys( $dirs );
</span><span class="cx" style="display: block; padding: 0 10px"> $dir = array_shift( $keys );
</span><span class="cx" style="display: block; padding: 0 10px"> $uri = array_shift( $dirs );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $dh = opendir( $dir ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $dh = opendir( $dir );
+ if ( $dh ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> while ( false !== $file = readdir( $dh ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $file = wp_basename( $file );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( substr( $file, 0, 1 ) == '.' ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6112,7 +6149,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $cap Capability.
</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 ( ! $cap = apply_filters( 'pub_priv_sql_capability', '' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cap = apply_filters( 'pub_priv_sql_capability', '' );
+ if ( ! $cap ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $cap = current_user_can( $post_type_obj->cap->read_private_posts );
</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">@@ -6642,7 +6680,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Now look for larger loops.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $loop = wp_find_hierarchy_loop( 'wp_get_post_parent_id', $post_ID, $post_parent ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $loop = wp_find_hierarchy_loop( 'wp_get_post_parent_id', $post_ID, $post_parent );
+ if ( ! $loop ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $post_parent; // No loop
</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">@@ -6728,7 +6767,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $posts Array of WP_Post objects.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_queue_posts_for_term_meta_lazyload( $posts ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $post_type_taxonomies = $term_ids = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post_type_taxonomies = array();
+ $term_ids = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $posts as $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! ( $post instanceof WP_Post ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiendpointsclasswprestpostscontrollerphp"></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/endpoints/class-wp-rest-posts-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1579,7 +1579,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( in_array( 'template', $fields, true ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $template = get_page_template_slug( $post->ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $template = get_page_template_slug( $post->ID );
+ if ( $template ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $data['template'] = $template;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $data['template'] = '';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1747,7 +1748,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If we have a featured media, add that.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $featured_media = get_post_thumbnail_id( $post->ID ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $featured_media = get_post_thumbnail_id( $post->ID );
+ if ( $featured_media ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $image_url = rest_url( 'wp/v2/media/' . $featured_media );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $links['https://api.w.org/featuredmedia'] = array(
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiendpointsclasswpresttermscontrollerphp"></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/endpoints/class-wp-rest-terms-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -423,7 +423,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * If we're going to inform the client that the term already exists,
</span><span class="cx" style="display: block; padding: 0 10px"> * give them the identifier for future use.
</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 ( $term_id = $term->get_error_data( 'term_exists' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $term_id = $term->get_error_data( 'term_exists' );
+ if ( $term_id ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $existing_term = get_term( $term_id, $this->taxonomy );
</span><span class="cx" style="display: block; padding: 0 10px"> $term->add_data( $existing_term->term_id, 'term_exists' );
</span><span class="cx" style="display: block; padding: 0 10px"> $term->add_data(
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiendpointsclasswprestuserscontrollerphp"></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/endpoints/class-wp-rest-users-controller.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -498,7 +498,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $messages as $message ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $error->add( $code, $message );
</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 ( $error_data = $error->get_error_data( $code ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $error_data = $error->get_error_data( $code );
+ if ( $error_data ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $error->add_data( $error_data, $code );
</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="trunksrcwpincludesrevisionphp"></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/revision.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/revision.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/revision.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -113,7 +113,8 @@
</span><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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post( $post_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post( $post_id );
+ if ( ! $post ) {
</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 class="lines" style="display: block; padding: 0 10px; color: #888">@@ -132,7 +133,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Compare the proposed update with the last stored revision verifying that
</span><span class="cx" style="display: block; padding: 0 10px"> // they are different, unless a plugin tells us to always save regardless.
</span><span class="cx" style="display: block; padding: 0 10px"> // If no previous revisions, save one
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $revisions = wp_get_post_revisions( $post_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $revisions = wp_get_post_revisions( $post_id );
+ if ( $revisions ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // grab the last revision, but not an autosave
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $revisions as $revision ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( false !== strpos( $revision->post_name, "{$revision->post_parent}-revision" ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -254,7 +256,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return false|int False if not a revision, ID of revision's parent otherwise.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_is_post_revision( $post ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = wp_get_post_revision( $post ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = wp_get_post_revision( $post );
+ if ( ! $post ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -270,7 +273,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return false|int False if not a revision, ID of autosave's parent otherwise
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_is_post_autosave( $post ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = wp_get_post_revision( $post ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = wp_get_post_revision( $post );
+ if ( ! $post ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -340,7 +344,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return WP_Post|array|null WP_Post (or array) on success, or null on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_post_revision( &$post, $output = OBJECT, $filter = 'raw' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $revision = get_post( $post, OBJECT, $filter ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $revision = get_post( $post, OBJECT, $filter );
+ if ( ! $revision ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $revision;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'revision' !== $revision->post_type ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -372,7 +377,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return int|false|null Null if error, false if no fields to restore, (int) post ID if success.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_restore_post_revision( $revision_id, $fields = null ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $revision = wp_get_post_revision( $revision_id, ARRAY_A ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $revision = wp_get_post_revision( $revision_id, ARRAY_A );
+ if ( ! $revision ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $revision;
</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">@@ -425,7 +431,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array|false|WP_Post|WP_Error|null Null or WP_Error if error, deleted post if success.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_delete_post_revision( $revision_id ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $revision = wp_get_post_revision( $revision_id ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $revision = wp_get_post_revision( $revision_id );
+ if ( ! $revision ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $revision;
</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">@@ -482,7 +489,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $revisions = get_children( $args ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $revisions = get_children( $args );
+ if ( ! $revisions ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return array();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -601,7 +609,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function _wp_preview_terms_filter( $terms, $post_id, $taxonomy ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post();
+ if ( ! $post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $terms;
</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">@@ -611,8 +620,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'standard' == $_REQUEST['post_format'] ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = array();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } elseif ( $term = get_term_by( 'slug', 'post-format-' . sanitize_key( $_REQUEST['post_format'] ), 'post_format' ) ) {
- $terms = array( $term ); // Can only have one post format
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ } else {
+ $term = get_term_by( 'slug', 'post-format-' . sanitize_key( $_REQUEST['post_format'] ), 'post_format' );
+ if ( $term ) {
+ $terms = array( $term ); // Can only have one post format
+ }
</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"> return $terms;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -630,7 +642,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return null|array The default return value or the post thumbnail meta array.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function _wp_preview_post_thumbnail_filter( $value, $post_id, $meta_key ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $post = get_post() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $post = get_post();
+ if ( ! $post ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $value;
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/taxonomy.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1403,7 +1403,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $where_fields[] = $taxonomy;
</span><span class="cx" style="display: block; padding: 0 10px"> $else_where_fields[] = $taxonomy;
</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 = $wpdb->get_row( $wpdb->prepare( "SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = %s $orderby $limit", $where_fields ), ARRAY_A ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $result = $wpdb->get_row( $wpdb->prepare( "SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $where AND tt.taxonomy = %s $orderby $limit", $where_fields ), ARRAY_A );
+ if ( $result ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $result;
</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">@@ -1410,7 +1411,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $wpdb->get_row( $wpdb->prepare( "SELECT tt.term_id, tt.term_taxonomy_id FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_id = t.term_id WHERE $else_where AND tt.taxonomy = %s $orderby $limit", $else_where_fields ), ARRAY_A );
</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 ( $result = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms as t WHERE $where $orderby $limit", $where_fields ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $result = $wpdb->get_var( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms as t WHERE $where $orderby $limit", $where_fields ) );
+ if ( $result ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $result;
</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">@@ -1750,7 +1752,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $term = (int) $term;
</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 ( ! $ids = term_exists( $term, $taxonomy ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $ids = term_exists( $term, $taxonomy );
+ if ( ! $ids ) {
</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"> if ( is_wp_error( $ids ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2448,7 +2451,8 @@
</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 ( ! $term_info = term_exists( $term, $taxonomy ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $term_info = term_exists( $term, $taxonomy );
+ if ( ! $term_info ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Skip if a non-existent term ID is passed.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_int( $term ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2607,7 +2611,8 @@
</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 ( ! $term_info = term_exists( $term, $taxonomy ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $term_info = term_exists( $term, $taxonomy );
+ if ( ! $term_info ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> // Skip if a non-existent term ID is passed.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_int( $term ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3543,7 +3548,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $ancestors[ $term->term_id ] = 1;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $children = _get_term_children( $term->term_id, $terms, $taxonomy, $ancestors ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $children = _get_term_children( $term->term_id, $terms, $taxonomy, $ancestors );
+ if ( $children ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $term_list = array_merge( $term_list, $children );
</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">@@ -3680,7 +3686,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $object_types = array_unique( $object_types );
</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 !== ( $check_attachments = array_search( 'attachment', $object_types ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $check_attachments = array_search( 'attachment', $object_types );
+ if ( false !== $check_attachments ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> unset( $object_types[ $check_attachments ] );
</span><span class="cx" style="display: block; padding: 0 10px"> $check_attachments = true;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3948,7 +3955,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Split term data recording is slow, so we do it just once, outside the loop.
</span><span class="cx" style="display: block; padding: 0 10px"> $split_term_data = get_option( '_split_terms', array() );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $skipped_first_term = $taxonomies = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $skipped_first_term = array();
+ $taxonomies = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $shared_tts as $shared_tt ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $term_id = intval( $shared_tt->term_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4385,7 +4393,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool|WP_Error WP_Error on input error.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function is_object_in_term( $object_id, $taxonomy, $terms = null ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $object_id = (int) $object_id ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $object_id = (int) $object_id;
+ if ( ! $object_id ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return new WP_Error( 'invalid_object', __( 'Invalid object ID.' ) );
</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">@@ -4411,7 +4420,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $terms = (array) $terms;
</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 ( $ints = array_filter( $terms, 'is_int' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $ints = array_filter( $terms, 'is_int' );
+ if ( $ints ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $strs = array_diff( $terms, $ints );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $strs =& $terms;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4558,7 +4568,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Now look for larger loops.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $loop = wp_find_hierarchy_loop( 'wp_get_term_taxonomy_parent_id', $term_id, $parent, array( $taxonomy ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $loop = wp_find_hierarchy_loop( 'wp_get_term_taxonomy_parent_id', $term_id, $parent, array( $taxonomy ) );
+ if ( ! $loop ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return $parent; // No loop
</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="trunksrcwpincludestemplateloaderphp"></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/template-loader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/template-loader.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/template-loader.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -28,7 +28,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"> // Process feeds and trackbacks even if not using themes.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-if ( is_robots() ) :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( is_robots() ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Fired when the template loader determines a robots.txt request.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -36,37 +36,56 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> do_action( 'do_robots' );
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-elseif ( is_feed() ) :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+} elseif ( is_feed() ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> do_feed();
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-elseif ( is_trackback() ) :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+} elseif ( is_trackback() ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> include( ABSPATH . 'wp-trackback.php' );
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-endif;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+}
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-if ( wp_using_themes() ) :
- $template = false;
- if ( is_embed() && $template = get_embed_template() ) :
- elseif ( is_404() && $template = get_404_template() ) :
- elseif ( is_search() && $template = get_search_template() ) :
- elseif ( is_front_page() && $template = get_front_page_template() ) :
- elseif ( is_home() && $template = get_home_template() ) :
- elseif ( is_privacy_policy() && $template = get_privacy_policy_template() ) :
- elseif ( is_post_type_archive() && $template = get_post_type_archive_template() ) :
- elseif ( is_tax() && $template = get_taxonomy_template() ) :
- elseif ( is_attachment() && $template = get_attachment_template() ) :
- remove_filter( 'the_content', 'prepend_attachment' );
- elseif ( is_single() && $template = get_single_template() ) :
- elseif ( is_page() && $template = get_page_template() ) :
- elseif ( is_singular() && $template = get_singular_template() ) :
- elseif ( is_category() && $template = get_category_template() ) :
- elseif ( is_tag() && $template = get_tag_template() ) :
- elseif ( is_author() && $template = get_author_template() ) :
- elseif ( is_date() && $template = get_date_template() ) :
- elseif ( is_archive() && $template = get_archive_template() ) :
- else :
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+if ( wp_using_themes() ) {
+
+ $tag_templates = array(
+ 'is_embed' => 'get_embed_template',
+ 'is_404' => 'get_404_template',
+ 'is_search' => 'get_search_template',
+ 'is_front_page' => 'get_front_page_template',
+ 'is_home' => 'get_home_template',
+ 'is_privacy_policy' => 'get_privacy_policy_template',
+ 'is_post_type_archive' => 'get_post_type_archive_template',
+ 'is_tax' => 'get_taxonomy_template',
+ 'is_attachment' => 'get_attachment_template',
+ 'is_single' => 'get_single_template',
+ 'is_page' => 'get_page_template',
+ 'is_singular' => 'get_singular_template',
+ 'is_category' => 'get_category_template',
+ 'is_tag' => 'get_tag_template',
+ 'is_author' => 'get_author_template',
+ 'is_date' => 'get_date_template',
+ 'is_archive' => 'get_archive_template',
+ );
+ $template = false;
+
+ // Loop through each of the template conditionals, and find the appropriate template file.
+ foreach ( $tag_templates as $tag => $template_getter ) {
+ if ( call_user_func( $tag ) ) {
+ $template = call_user_func( $template_getter );
+ }
+
+ if ( $template ) {
+ if ( 'is_attachment' === $tag ) {
+ remove_filter( 'the_content', 'prepend_attachment' );
+ }
+
+ break;
+ }
+ }
+
+ if ( ! $template ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $template = get_index_template();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- endif;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters the path of the current template before including it.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -74,7 +93,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $template The path of the template to include.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $template = apply_filters( 'template_include', $template ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $template = apply_filters( 'template_include', $template );
+ if ( $template ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> include( $template );
</span><span class="cx" style="display: block; padding: 0 10px"> } elseif ( current_user_can( 'switch_themes' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $theme = wp_get_theme();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -83,4 +103,4 @@
</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"> return;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-endif;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+}
</ins></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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/theme.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -79,7 +79,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $_themes[ $theme_root['theme_root'] . '/' . $theme ] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $themes[ $theme ] = $_themes[ $theme_root['theme_root'] . '/' . $theme ];
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $themes[ $theme ] = $_themes[ $theme_root['theme_root'] . '/' . $theme ] = new WP_Theme( $theme, $theme_root['theme_root'] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $themes[ $theme ] = new WP_Theme( $theme, $theme_root['theme_root'] );
+ $_themes[ $theme_root['theme_root'] . '/' . $theme ] = $themes[ $theme ];
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -463,7 +464,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $cache_expiration Whether to get the cache of the theme directories. Default false.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $cache_directory Directory to be searched for the cache.
</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 ( $cache_expiration = apply_filters( 'wp_cache_themes_persistently', false, 'search_theme_directories' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $cache_expiration = apply_filters( 'wp_cache_themes_persistently', false, 'search_theme_directories' );
+ if ( $cache_expiration ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $cached_roots = get_site_transient( 'theme_roots' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_array( $cached_roots ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $cached_roots as $theme_dir => $theme_root ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -570,13 +572,20 @@
</span><span class="cx" style="display: block; padding: 0 10px"> function get_theme_root( $stylesheet_or_template = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_theme_directories;
</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 ( $stylesheet_or_template && $theme_root = get_raw_theme_root( $stylesheet_or_template ) ) {
- // Always prepend WP_CONTENT_DIR unless the root currently registered as a theme directory.
- // This gives relative theme roots the benefit of the doubt when things go haywire.
- if ( ! in_array( $theme_root, (array) $wp_theme_directories ) ) {
- $theme_root = WP_CONTENT_DIR . $theme_root;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $theme_root = '';
+
+ if ( $stylesheet_or_template ) {
+ $theme_root = get_raw_theme_root( $stylesheet_or_template );
+ if ( $theme_root ) {
+ // Always prepend WP_CONTENT_DIR unless the root currently registered as a theme directory.
+ // This gives relative theme roots the benefit of the doubt when things go haywire.
+ if ( ! in_array( $theme_root, (array) $wp_theme_directories ) ) {
+ $theme_root = WP_CONTENT_DIR . $theme_root;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- } else {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
+
+ if ( ! $theme_root ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $theme_root = WP_CONTENT_DIR . '/themes';
</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">@@ -1312,9 +1321,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $data = get_theme_mod( 'header_image_data' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $data && current_theme_supports( 'custom-header', 'default-image' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $directory_args = array( get_template_directory_uri(), get_stylesheet_directory_uri() );
- $data = array();
- $data['url'] = $data['thumbnail_url'] = vsprintf( get_theme_support( 'custom-header', 'default-image' ), $directory_args );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $directory_args = array( get_template_directory_uri(), get_stylesheet_directory_uri() );
+ $data = array();
+ $data['url'] = vsprintf( get_theme_support( 'custom-header', 'default-image' ), $directory_args );
+ $data['thumbnail_url'] = $data['url'];
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $_wp_default_headers ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( (array) $_wp_default_headers as $default_header ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $url = vsprintf( $default_header['url'], $directory_args );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2900,7 +2910,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.3.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function check_theme_switched() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $stylesheet = get_option( 'theme_switched' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $stylesheet = get_option( 'theme_switched' );
+ if ( $stylesheet ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $old_theme = wp_get_theme( $stylesheet );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Prevent widget & menu mapping from running since Customizer already called it up front
</span></span></pre></div>
<a id="trunksrcwpincludesupdatephp"></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/update.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/update.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/update.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -132,8 +132,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $post_body = array_merge( $post_body, $extra_stats );
</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">- $url = $http_url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' );
- if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $url = 'http://api.wordpress.org/core/version-check/1.7/?' . http_build_query( $query, null, '&' );
+ $http_url = $url;
+ $ssl = wp_http_supports( array( 'ssl' ) );
+ if ( $ssl ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $url = set_url_scheme( $url, 'https' );
</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">@@ -368,8 +370,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $options['body']['update_stats'] = wp_json_encode( $extra_stats );
</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">- $url = $http_url = 'http://api.wordpress.org/plugins/update-check/1.1/';
- if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $url = 'http://api.wordpress.org/plugins/update-check/1.1/';
+ $http_url = $url;
+ $ssl = wp_http_supports( array( 'ssl' ) );
+ if ( $ssl ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $url = set_url_scheme( $url, 'https' );
</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">@@ -447,7 +451,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $last_update = new stdClass;
</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">- $themes = $checked = $request = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $themes = array();
+ $checked = array();
+ $request = array();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Put slug of current theme into request.
</span><span class="cx" style="display: block; padding: 0 10px"> $request['active'] = get_option( 'stylesheet' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -553,8 +559,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $options['body']['update_stats'] = wp_json_encode( $extra_stats );
</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">- $url = $http_url = 'http://api.wordpress.org/themes/update-check/1.1/';
- if ( $ssl = wp_http_supports( array( 'ssl' ) ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $url = 'http://api.wordpress.org/themes/update-check/1.1/';
+ $http_url = $url;
+ $ssl = wp_http_supports( array( 'ssl' ) );
+ if ( $ssl ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $url = set_url_scheme( $url, 'https' );
</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">@@ -644,7 +652,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'translations' => 0,
</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 ( $plugins = current_user_can( 'update_plugins' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $plugins = current_user_can( 'update_plugins' );
+ if ( $plugins ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $update_plugins = get_site_transient( 'update_plugins' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $update_plugins->response ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $counts['plugins'] = count( $update_plugins->response );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -651,7 +660,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $themes = current_user_can( 'update_themes' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $themes = current_user_can( 'update_themes' );
+ if ( $themes ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $update_themes = get_site_transient( 'update_themes' );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $update_themes->response ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $counts['themes'] = count( $update_themes->response );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -658,7 +668,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ( $core = current_user_can( 'update_core' ) ) && function_exists( 'get_core_updates' ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $core = current_user_can( 'update_core' );
+ if ( $core && function_exists( 'get_core_updates' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $update_wordpress = get_core_updates( array( 'dismissed' => false ) );
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $update_wordpress ) && ! in_array( $update_wordpress[0]->response, array( 'development', 'latest' ) ) && current_user_can( 'update_core' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $counts['wordpress'] = 1;
</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 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/user.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -480,7 +480,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $user = get_current_user_id();
</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 ( ! $user = get_userdata( $user ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user = get_userdata( $user );
+ if ( ! $user ) {
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -1013,10 +1014,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $user = get_userdata( $for_user_id );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $user ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $user_ID = 0;
- $user_level = 0;
- $userdata = null;
- $user_login = $user_email = $user_url = $user_identity = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $user_ID = 0;
+ $user_level = 0;
+ $userdata = null;
+ $user_login = '';
+ $user_email = '';
+ $user_url = '';
+ $user_identity = '';
</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="trunksrcwpincludesvarsphp"></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/vars.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/vars.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/vars.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -51,7 +51,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $self_matches );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Simple browser detection
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-$is_lynx = $is_gecko = $is_winIE = $is_macIE = $is_opera = $is_NS4 = $is_safari = $is_chrome = $is_iphone = $is_edge = false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+$is_lynx = false;
+$is_gecko = false;
+$is_winIE = false;
+$is_macIE = false;
+$is_opera = false;
+$is_NS4 = false;
+$is_safari = false;
+$is_chrome = false;
+$is_iphone = false;
+$is_edge = false;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Lynx' ) !== false ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -68,7 +77,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $is_admin Whether to use the Google Chrome Frame. Default is the value of is_admin().
</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_chrome = apply_filters( 'use_google_chrome_frame', $is_admin ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $is_chrome = apply_filters( 'use_google_chrome_frame', $is_admin );
+ if ( $is_chrome ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> header( 'X-UA-Compatible: chrome=1' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $is_winIE = ! $is_chrome;
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsclasswpnavmenuwidgetphp"></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-nav-menu-widget.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets/class-wp-nav-menu-widget.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/widgets/class-wp-nav-menu-widget.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -120,7 +120,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> // Get menus
</span><span class="cx" style="display: block; padding: 0 10px"> $menus = wp_get_nav_menus();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $empty_menus_style = $not_empty_menus_style = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $empty_menus_style = '';
+ $not_empty_menus_style = '';
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $menus ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $empty_menus_style = ' style="display:none" ';
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span></span></pre></div>
<a id="trunksrcwpincludeswidgetsclasswpwidgetlinksphp"></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-links.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-links.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/widgets/class-wp-widget-links.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -138,7 +138,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> )
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> $link_cats = get_terms( 'link_category' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $limit = intval( $instance['limit'] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $limit = intval( $instance['limit'] );
+ if ( ! $limit ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $limit = -1;
</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="trunksrcwpincludeswidgetsphp"></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.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/widgets.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/widgets.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1026,7 +1026,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_convert_widget_settings( $base_name, $option_name, $settings ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // This test may need expanding.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $single = $changed = false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $single = false;
+ $changed = false;
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $settings ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $single = true;
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span></span></pre></div>
<a id="trunksrcwpincludeswpdbphp"></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/wp-db.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/wp-db.php 2019-07-02 11:21:53 UTC (rev 45589)
+++ trunk/src/wp-includes/wp-db.php 2019-07-02 23:41:16 UTC (rev 45590)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1438,7 +1438,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> wp_load_translations_early();
</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 ( $caller = $this->get_caller() ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $caller = $this->get_caller();
+ if ( $caller ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: Database error message, 2: SQL query, 3: Name of the calling function */
</span><span class="cx" style="display: block; padding: 0 10px"> $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s made by %3$s' ), $str, $this->last_query, $caller );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1543,7 +1544,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->last_result = array();
</span><span class="cx" style="display: block; padding: 0 10px"> $this->col_info = null;
</span><span class="cx" style="display: block; padding: 0 10px"> $this->last_query = null;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->rows_affected = $this->num_rows = 0;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $this->rows_affected = 0;
+ $this->num_rows = 0;
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->last_error = '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $this->use_mysqli && $this->result instanceof mysqli_result ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1594,7 +1596,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $socket = null;
</span><span class="cx" style="display: block; padding: 0 10px"> $is_ipv6 = 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">- if ( $host_data = $this->parse_db_host( $this->dbhost ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $host_data = $this->parse_db_host( $this->dbhost );
+ if ( $host_data ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> list( $host, $port, $socket, $is_ipv6 ) = $host_data;
</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">@@ -2161,7 +2164,8 @@
</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">- $formats = $values = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $formats = array();
+ $values = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $data as $value ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_null( $value['value'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $formats[] = 'NULL';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2225,7 +2229,9 @@
</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">- $fields = $conditions = $values = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $fields = array();
+ $conditions = array();
+ $values = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $data as $field => $value ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_null( $value['value'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $fields[] = "`$field` = NULL";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2286,7 +2292,8 @@
</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">- $conditions = $values = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $conditions = array();
+ $values = array();
</ins><span class="cx" style="display: block; padding: 0 10px"> foreach ( $where as $field => $value ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_null( $value['value'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $conditions[] = "`$field` IS NULL";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2358,7 +2365,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * of 'value' and 'format' keys.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected function process_field_formats( $data, $format ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $formats = $original_formats = (array) $format;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $formats = (array) $format;
+ $original_formats = $formats;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> foreach ( $data as $field => $value ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $value = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2650,7 +2658,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->table_charset[ $tablekey ];
</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">- $charsets = $columns = array();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $charsets = array();
+ $columns = array();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $table_parts = explode( '.', $table );
</span><span class="cx" style="display: block; padding: 0 10px"> $table = '`' . implode( '`.`', $table_parts ) . '`';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3048,7 +3057,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // We couldn't use any local conversions, send it to the DB.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $value['db'] = $db_check_string = true;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $value['db'] = true;
+ $db_check_string = true;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> unset( $value ); // Remove by reference.
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre>
</div>
</div>
</body>
</html>