<!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>[49929] trunk/src: Docs: In various `@return` tags, list the expected type first, instead of `false` or `WP_Error`.</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/49929">49929</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/49929","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>SergeyBiryukov</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-01-04 17:16:43 +0000 (Mon, 04 Jan 2021)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Docs: In various `@return` tags, list the expected type first, instead of `false` or `WP_Error`.
Follow-up to <a href="https://core.trac.wordpress.org/changeset/46696">[46696]</a>, <a href="https://core.trac.wordpress.org/changeset/47060">[47060]</a>, <a href="https://core.trac.wordpress.org/changeset/49926">[49926]</a>, <a href="https://core.trac.wordpress.org/changeset/49927">[49927]</a>.
See <a href="https://core.trac.wordpress.org/ticket/51800">#51800</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesclasswpcommunityeventsphp">trunk/src/wp-admin/includes/class-wp-community-events.php</a></li>
<li><a href="#trunksrcwpadminincludesdeprecatedphp">trunk/src/wp-admin/includes/deprecated.php</a></li>
<li><a href="#trunksrcwpadminincludesfilephp">trunk/src/wp-admin/includes/file.php</a></li>
<li><a href="#trunksrcwpadminincludesimagephp">trunk/src/wp-admin/includes/image.php</a></li>
<li><a href="#trunksrcwpadminincludesmsphp">trunk/src/wp-admin/includes/ms.php</a></li>
<li><a href="#trunksrcwpincludesclasswphookphp">trunk/src/wp-includes/class-wp-hook.php</a></li>
<li><a href="#trunksrcwpincludesclasswprecoverymodeemailservicephp">trunk/src/wp-includes/class-wp-recovery-mode-email-service.php</a></li>
<li><a href="#trunksrcwpincludescronphp">trunk/src/wp-includes/cron.php</a></li>
<li><a href="#trunksrcwpincludesfunctionsphp">trunk/src/wp-includes/functions.php</a></li>
<li><a href="#trunksrcwpincludespluginphp">trunk/src/wp-includes/plugin.php</a></li>
<li><a href="#trunksrcwpincludespostphp">trunk/src/wp-includes/post.php</a></li>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswprestblockdirectorycontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php</a></li>
<li><a href="#trunksrcwpincludesrestapiendpointsclasswprestblocktypescontrollerphp">trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php</a></li>
<li><a href="#trunksrcwpincludesrssphp">trunk/src/wp-includes/rss.php</a></li>
<li><a href="#trunksrcwpincludestaxonomyphp">trunk/src/wp-includes/taxonomy.php</a></li>
<li><a href="#trunksrcwpincludesuserphp">trunk/src/wp-includes/user.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesclasswpcommunityeventsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-community-events.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-community-events.php 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-admin/includes/class-wp-community-events.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -306,7 +306,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.8.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $location Should contain 'latitude' and 'longitude' indexes.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return false|string false on failure, or a string on success.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string|false Transient key on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected function get_events_transient_key( $location ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $key = false;
</span></span></pre></div>
<a id="trunksrcwpadminincludesdeprecatedphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/deprecated.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/deprecated.php 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-admin/includes/deprecated.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -128,7 +128,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $parent Optional. Parent ID to retrieve categories for. Default 0.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $level Optional. Number of levels deep to display. Default 0.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $categories Optional. Categories to include in the control. Default 0.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return false|void False if no categories were found.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return void|false False if no categories were found.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px"> _deprecated_function( __FUNCTION__, '3.0.0', 'wp_dropdown_categories()' );
</span></span></pre></div>
<a id="trunksrcwpadminincludesfilephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/file.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/file.php 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-admin/includes/file.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -130,7 +130,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $folder Optional. Full path to folder. Default empty.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $levels Optional. Levels of folders to follow, Default 100 (PHP Loop limit).
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string[] $exclusions Optional. List of folders and files to skip.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return false|string[] False on failure, else array of files.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string[]|false Array of files on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function list_files( $folder = '', $levels = 100, $exclusions = array() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( empty( $folder ) ) {
</span></span></pre></div>
<a id="trunksrcwpadminincludesimagephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/image.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/image.php 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-admin/includes/image.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -680,7 +680,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $file
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return false|array False on failure. Image metadata array on success.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array|false Image metadata array on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_read_image_metadata( $file ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! file_exists( $file ) ) {
</span></span></pre></div>
<a id="trunksrcwpadminincludesmsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/ms.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/ms.php 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-admin/includes/ms.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -311,7 +311,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.0.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $id The user ID.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return false|int The ID of the refreshed user or false if the user does not exist.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return int|false The ID of the refreshed user or false if the user does not exist.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function refresh_user_details( $id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $id = (int) $id;
</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 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-includes/class-wp-hook.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -194,7 +194,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $tag Optional. The name of the filter hook. Default empty.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param callable|false $function_to_check Optional. The callback to check for. Default false.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return int|bool If `$function_to_check` is omitted, returns boolean for whether the hook has
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return bool|int If `$function_to_check` is omitted, returns boolean for whether the hook has
</ins><span class="cx" style="display: block; padding: 0 10px"> * anything registered. When checking a specific function, the priority of that
</span><span class="cx" style="display: block; padding: 0 10px"> * hook is returned, or false if the function is not attached.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span></span></pre></div>
<a id="trunksrcwpincludesclasswprecoverymodeemailservicephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-recovery-mode-email-service.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-recovery-mode-email-service.php 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-includes/class-wp-recovery-mode-email-service.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -289,7 +289,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.3.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $extension The extension that caused the error.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return false|array A plugin array {@see get_plugins()} or `false` if no plugin was found.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array|false A plugin array {@see get_plugins()} or `false` if no plugin was found.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> private function get_plugin( $extension ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! function_exists( 'get_plugins' ) ) {
</span></span></pre></div>
<a id="trunksrcwpincludescronphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/cron.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/cron.php 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-includes/cron.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -754,7 +754,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.1.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.1.0 Return value added to indicate success or failure.
</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 false|int On success an integer indicating number of events spawned (0 indicates no
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return int|false On success an integer indicating number of events spawned (0 indicates no
</ins><span class="cx" style="display: block; padding: 0 10px"> * events needed to be spawned), false if spawning fails for one or more events.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_cron() {
</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 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-includes/functions.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -938,7 +938,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $url URL to retrieve HTTP headers from.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $deprecated Not Used.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return false|string False on failure, headers on success.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string|false Headers on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_http_headers( $url, $deprecated = false ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $deprecated ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6914,7 +6914,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * 'image', or an arbitrary other context. If an arbitrary context is passed,
</span><span class="cx" style="display: block; padding: 0 10px"> * the similarly arbitrary {@see '$context_memory_limit'} filter will be
</span><span class="cx" style="display: block; padding: 0 10px"> * invoked. Default 'admin'.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return false|int|string The limit that was set or false on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return int|string|false The limit that was set or false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_raise_memory_limit( $context = 'admin' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Exit early if the limit cannot be changed.
</span></span></pre></div>
<a id="trunksrcwpincludespluginphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/plugin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/plugin.php 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-includes/plugin.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -132,7 +132,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $tag The name of the filter hook.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param callable|false $function_to_check Optional. The callback to check for. Default false.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return int|bool If `$function_to_check` is omitted, returns boolean for whether the hook has
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return bool|int If `$function_to_check` is omitted, returns boolean for whether the hook has
</ins><span class="cx" style="display: block; padding: 0 10px"> * anything registered. When checking a specific function, the priority of that
</span><span class="cx" style="display: block; padding: 0 10px"> * hook is returned, or false if the function is not attached.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -565,7 +565,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $tag The name of the action hook.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param callable|false $function_to_check Optional. The callback to check for. Default false.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return int|bool If `$function_to_check` is omitted, returns boolean for whether the hook has
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return bool|int If `$function_to_check` is omitted, returns boolean for whether the hook has
</ins><span class="cx" style="display: block; padding: 0 10px"> * anything registered. When checking a specific function, the priority of that
</span><span class="cx" style="display: block; padding: 0 10px"> * hook is returned, or false if the function is not attached.
</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 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-includes/post.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5060,7 +5060,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.7.0 `$post_id` can be a WP_Post object.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int|WP_Post $post_id Post ID or object.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return false|string[] Array of URLs already pinged for the given post, false if the post is not found.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return string[]|false Array of URLs already pinged for the given post, false if the post is not found.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_pung( $post_id ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $post = get_post( $post_id );
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiendpointsclasswprestblockdirectorycontrollerphp"></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-block-directory-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-block-directory-controller.php 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -50,7 +50,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_REST_Request $request Full details about the request.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Error|true True if the request has permission, WP_Error object otherwise.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return true|WP_Error True if the request has permission, WP_Error object otherwise.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_items_permissions_check( $request ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! current_user_can( 'install_plugins' ) || ! current_user_can( 'activate_plugins' ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -71,7 +71,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_REST_Request $request Full details about the request.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_items( $request ) {
</span><span class="cx" style="display: block; padding: 0 10px"> require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -115,7 +115,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $plugin The plugin metadata.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_REST_Request $request Request object.
</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 WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function prepare_item_for_response( $plugin, $request ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // There might be multiple blocks in a plugin. Only the first block is mapped.
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiendpointsclasswprestblocktypescontrollerphp"></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-block-types-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-block-types-controller.php 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -114,7 +114,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_REST_Request $request Full details about the request.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Error|true True if the request has read access, WP_Error object otherwise.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return true|WP_Error True if the request has read access, WP_Error object otherwise.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_items_permissions_check( $request ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return $this->check_read_permission();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -126,7 +126,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_REST_Request $request Full details about the request.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_items( $request ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $data = array();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -160,7 +160,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_REST_Request $request Full details about the request.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Error|true True if the request has read access for the item, WP_Error object otherwise.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_item_permissions_check( $request ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $check = $this->check_read_permission();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -181,7 +181,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.5.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">- * @return WP_Error|true True if the block type is visible, WP_Error otherwise.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return true|WP_Error True if the block type is visible, WP_Error otherwise.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected function check_read_permission() {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( current_user_can( 'edit_posts' ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -219,7 +219,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_REST_Request $request Full details about the request.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Error|WP_REST_Response Response object on success, or WP_Error object on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_item( $request ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $block_name = sprintf( '%s/%s', $request['namespace'], $request['name'] );
</span></span></pre></div>
<a id="trunksrcwpincludesrssphp"></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/rss.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rss.php 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-includes/rss.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -403,8 +403,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @package External
</span><span class="cx" style="display: block; padding: 0 10px"> * @subpackage MagpieRSS
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $url URL to retrieve feed
- * @return false|MagpieRSS false on failure or MagpieRSS object on success.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $url URL to retrieve feed.
+ * @return MagpieRSS|false MagpieRSS object on success, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function fetch_rss ($url) {
</span><span class="cx" style="display: block; padding: 0 10px"> // initialize constants
</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 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-includes/taxonomy.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -743,8 +743,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int|array $term_ids Term ID or array of term IDs of terms that will be used.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string|array $taxonomies String of taxonomy name or Array of string values of taxonomy names.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array|string $args Change the order of the object_ids, either ASC or DESC.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Error|array If the taxonomy does not exist, then WP_Error will be returned. On success.
- * the array can be empty meaning that there are no $object_ids found or it will return the $object_ids found.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return array|WP_Error An array of $object_ids on success, WP_Error if the taxonomy does not exist.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_objects_in_term( $term_ids, $taxonomies, $args = array() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</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 2021-01-04 16:56:20 UTC (rev 49928)
+++ trunk/src/wp-includes/user.php 2021-01-04 17:16:43 UTC (rev 49929)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1537,7 +1537,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.0.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param object|WP_User $user User object or database row to be cached
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return false|void Returns false on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return void|false Returns false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function update_user_caches( $user ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $user instanceof WP_User ) {
</span></span></pre>
</div>
</div>
</body>
</html>