<!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>[43582] trunk/src: Docs: Correct and improve various inline documentation.</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/43582">43582</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/43582","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>johnbillion</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2018-08-27 14:27:22 +0000 (Mon, 27 Aug 2018)</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: Correct and improve various inline documentation.
See <a href="https://core.trac.wordpress.org/ticket/42505">#42505</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcjs_enqueueswpmediaeditorjs">trunk/src/js/_enqueues/wp/media/editor.js</a></li>
<li><a href="#trunksrcwpadminincludespostphp">trunk/src/wp-admin/includes/post.php</a></li>
<li><a href="#trunksrcwpincludesclasswpqueryphp">trunk/src/wp-includes/class-wp-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswpuserphp">trunk/src/wp-includes/class-wp-user.php</a></li>
<li><a href="#trunksrcwpincludesgeneraltemplatephp">trunk/src/wp-includes/general-template.php</a></li>
<li><a href="#trunksrcwpincludesmediaphp">trunk/src/wp-includes/media.php</a></li>
<li><a href="#trunksrcwpincludesmetaphp">trunk/src/wp-includes/meta.php</a></li>
<li><a href="#trunksrcwpincludespostphp">trunk/src/wp-includes/post.php</a></li>
<li><a href="#trunksrcwpincludesrestapiclasswprestresponsephp">trunk/src/wp-includes/rest-api/class-wp-rest-response.php</a></li>
<li><a href="#trunksrcwpincludesrestapiclasswprestserverphp">trunk/src/wp-includes/rest-api/class-wp-rest-server.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcjs_enqueueswpmediaeditorjs"></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/wp/media/editor.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/wp/media/editor.js 2018-08-20 15:08:15 UTC (rev 43581)
+++ trunk/src/js/_enqueues/wp/media/editor.js 2018-08-27 14:27:22 UTC (rev 43582)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -609,8 +609,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> return wp.media.view.settings.post.featuredImageId;
</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">- * Set the featured image id, save the post thumbnail data and
- * set the HTML in the post meta box to the new featured image.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Sets the featured image ID property and sets the HTML in the post meta box to the new featured image.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {number} id The post ID of the featured image, or -1 to unset it.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span></span></pre></div>
<a id="trunksrcwpadminincludespostphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/post.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/post.php 2018-08-20 15:08:15 UTC (rev 43581)
+++ trunk/src/wp-admin/includes/post.php 2018-08-27 14:27:22 UTC (rev 43582)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1519,9 +1519,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.5.0 Added the `$post_id` parameter.
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.6.0 Added the `$thumbnail_id` parameter.
</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 $content Admin post thumbnail HTML markup.
- * @param int $post_id Post ID.
- * @param int $thumbnail_id Thumbnail ID.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $content Admin post thumbnail HTML markup.
+ * @param int $post_id Post ID.
+ * @param int|null $thumbnail_id Thumbnail attachment ID, or null if there isn't one.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'admin_post_thumbnail_html', $content, $post->ID, $thumbnail_id );
</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 2018-08-20 15:08:15 UTC (rev 43581)
+++ trunk/src/wp-includes/class-wp-query.php 2018-08-27 14:27:22 UTC (rev 43582)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1686,7 +1686,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Retrieve the posts based on query variables.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves an array of posts based on query variables.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * There are a few filters and actions that can be used to modify the post
</span><span class="cx" style="display: block; padding: 0 10px"> * database query.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1693,7 +1693,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return array List of posts.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_Post[]|int[] Array of post objects or post IDs.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_posts() {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3357,7 +3357,7 @@
</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"> * @param string|array $query URL query string or array of query arguments.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return array List of posts.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_Post[]|int[] Array of post objects or post IDs.
</ins><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></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 2018-08-20 15:08:15 UTC (rev 43581)
+++ trunk/src/wp-includes/class-wp-user.php 2018-08-27 14:27:22 UTC (rev 43582)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -80,7 +80,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * All capabilities the user has, including individual and role based.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.0.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @var array
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @var bool[] Array of key/value pairs where keys represent a capability name and boolean values
+ * represent whether the user has that capability.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public $allcaps = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -478,16 +479,15 @@
</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">- * Retrieve all of the role capabilities and merge with individual capabilities.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves all of the capabilities of the roles of the user, and merges them with individual user capabilities.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * All of the capabilities of the roles the user belongs to are merged with
- * user's individual capabilities. This also means that the user can be denied
- * specific capabilities that their role might have, but the user isn't granted
- * permission to.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * All of the capabilities of the roles of the user are merged with the user's individual capabilities. This means
+ * that the user can be denied specific capabilities that their role might have, but the user is specifically denied.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.0.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 array List of all capabilities for the user.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return bool[] Array of key/value pairs where keys represent a capability name and boolean values
+ * represent whether the user has that capability.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get_role_caps() {
</span><span class="cx" style="display: block; padding: 0 10px"> $switch_site = false;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -751,11 +751,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Dynamically filter a user's capabilities.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.0.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @since 3.7.0 Added the user object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @since 3.7.0 Added the `$user` parameter.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param bool[] $allcaps An array of all the user's capabilities.
- * @param string[] $caps Actual capabilities for meta capability.
- * @param array $args Optional parameters passed to has_cap(), typically object ID.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param bool[] $allcaps Array of key/value pairs where keys represent a capability name and boolean values
+ * represent whether the user has that capability.
+ * @param string[] $caps Required primitive capabilities for the requested capability.
+ * @param array $args {
+ * Arguments that accompany the requested capability check.
+ *
+ * @type string $0 Requested capability.
+ * @type int $1 Concerned user ID.
+ * @type mixed ...$2 Optional second and further parameters, typically object ID.
+ * }
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_User $user The user object.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $capabilities = apply_filters( 'user_has_cap', $this->allcaps, $caps, $args, $this );
</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 2018-08-20 15:08:15 UTC (rev 43581)
+++ trunk/src/wp-includes/general-template.php 2018-08-27 14:27:22 UTC (rev 43582)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2904,11 +2904,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Filters the site icon meta tags, so Plugins can add their own.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Filters the site icon meta tags, so plugins can add their own.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.3.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">- * @param array $meta_tags Site Icon meta elements.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string[] $meta_tags Array of Site Icon meta tags.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $meta_tags = apply_filters( 'site_icon_meta_tags', $meta_tags );
</span><span class="cx" style="display: block; padding: 0 10px"> $meta_tags = array_filter( $meta_tags );
</span></span></pre></div>
<a id="trunksrcwpincludesmediaphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/media.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/media.php 2018-08-20 15:08:15 UTC (rev 43581)
+++ trunk/src/wp-includes/media.php 2018-08-27 14:27:22 UTC (rev 43582)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3414,9 +3414,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $response Array of prepared attachment data.
- * @param WP_Post $attachment Attachment object.
- * @param array $meta Array of attachment meta data.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $response Array of prepared attachment data.
+ * @param WP_Post $attachment Attachment object.
+ * @param array|false $meta Array of attachment meta data, or false if there is none.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> return apply_filters( 'wp_prepare_attachment_for_js', $response, $attachment, $meta );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</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 2018-08-20 15:08:15 UTC (rev 43581)
+++ trunk/src/wp-includes/meta.php 2018-08-27 14:27:22 UTC (rev 43582)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -150,7 +150,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param mixed $prev_value Optional. If specified, only update existing metadata entries with
</span><span class="cx" style="display: block; padding: 0 10px"> * the specified value. Otherwise, update all entries.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return int|bool Meta ID if the key didn't exist, true on successful update, false on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return int|bool The new meta field ID if a field with the given key didn't exist and was
+ * therefore added, true on successful update, 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_metadata( $meta_type, $object_id, $meta_key, $meta_value, $prev_value = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</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 2018-08-20 15:08:15 UTC (rev 43581)
+++ trunk/src/wp-includes/post.php 2018-08-27 14:27:22 UTC (rev 43582)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1823,7 +1823,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Retrieve list of latest posts or posts matching criteria.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves an array of the latest posts, or posts matching the given criteria.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * The defaults are as follows:
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1844,7 +1844,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @type array $exclude An array of post IDs not to retrieve. Default empty array.
</span><span class="cx" style="display: block; padding: 0 10px"> * @type bool $suppress_filters Whether to suppress filters. Default 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">- * @return array List of posts.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_Post[]|int[] Array of post objects or post IDs.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_posts( $args = null ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $defaults = array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1891,7 +1891,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Add meta data field to a post.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Adds a meta field to the given post.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Post meta data is called "Custom Fields" on the Administration Screen.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1918,11 +1918,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Remove metadata matching criteria from a post.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Deletes a post meta field for the given post ID.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * You can match based on the key, or key and value. Removing based on key and
</span><span class="cx" style="display: block; padding: 0 10px"> * value, will keep from removing duplicate metadata with the same key. It also
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * allows removing all metadata matching key, if needed.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * allows removing all metadata matching the key, if needed.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -1946,7 +1946,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Retrieve post meta field for a post.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Retrieves a post meta field for the given post ID.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -1953,10 +1953,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $post_id Post ID.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $key Optional. The meta key to retrieve. By default, returns
</span><span class="cx" style="display: block; padding: 0 10px"> * data for all keys. Default empty.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param bool $single Optional, default is false.
- * If true, return only the first value of the specified meta_key.
- * This parameter has no effect if meta_key is not specified.
- * @return mixed Will be an array if $single is false. Will be value of meta data
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param bool $single Optional. If true, returns only the first value for the specified meta key.
+ * This parameter has no effect if $key is not specified. Default false.
+ * @return mixed Will be an array if $single is false. Will be value of the meta
</ins><span class="cx" style="display: block; padding: 0 10px"> * field if $single is true.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_post_meta( $post_id, $key = '', $single = false ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1964,12 +1963,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Update post meta field based on post ID.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Updates a post meta field based on the given post ID.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Use the $prev_value parameter to differentiate between meta fields with the
</span><span class="cx" style="display: block; padding: 0 10px"> * same key and 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 the meta field for the post does not exist, it will be added.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * If the meta field for the post does not exist, it will be added and its ID returned.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</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="lines" style="display: block; padding: 0 10px; color: #888">@@ -1976,10 +1975,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $post_id Post ID.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $meta_key Metadata key.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param mixed $prev_value Optional. Previous value to check before removing.
- * Default empty.
- * @return int|bool Meta ID if the key didn't exist, true on successful update,
- * false on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param mixed $prev_value Optional. Previous value to check before updating.
+ * @return int|bool The new meta field ID if a field with the given key didn't exist and was
+ * therefore added, true on successful update, 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_post_meta( $post_id, $meta_key, $meta_value, $prev_value = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> // Make sure meta is added to the post, not a revision.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1995,7 +1993,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Delete everything from post meta matching meta key.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Deletes everything from post meta matching the given meta key.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.3.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6490,12 +6488,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Return the post's parent post ID.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Returns the ID of the post's parent.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.1.0
</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 Post ID or post object. Defaults to global $post.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return int|false Post parent ID, otherwise false.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return int|false Post parent ID (which can be 0 if there is no parent), or false if the post does not exist.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_get_post_parent_id( $post ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $post = get_post( $post );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6559,7 +6557,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Set a post thumbnail.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Sets the post thumbnail (featured image) for the given post.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.1.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -6581,11 +6579,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Remove a post thumbnail.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Removes the thumbnail (featured image) from the given post.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|WP_Post $post Post ID or post object where thumbnail should be removed from.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Post $post Post ID or post object from which the thumbnail should be removed.
</ins><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"> function delete_post_thumbnail( $post ) {
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiclasswprestresponsephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/rest-api/class-wp-rest-response.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/class-wp-rest-response.php 2018-08-20 15:08:15 UTC (rev 43581)
+++ trunk/src/wp-includes/rest-api/class-wp-rest-response.php 2018-08-27 14:27:22 UTC (rev 43582)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -193,7 +193,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Retrieves the handler that was responsible for generating the response.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Sets the handler that was responsible for generating the response.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span></span></pre></div>
<a id="trunksrcwpincludesrestapiclasswprestserverphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/rest-api/class-wp-rest-server.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/rest-api/class-wp-rest-server.php 2018-08-20 15:08:15 UTC (rev 43581)
+++ trunk/src/wp-includes/rest-api/class-wp-rest-server.php 2018-08-27 14:27:22 UTC (rev 43582)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -904,9 +904,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.7.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">- * @param WP_HTTP_Response $response Result to send to the client. Usually a WP_REST_Response.
- * @param WP_REST_Server $handler ResponseHandler instance (usually WP_REST_Server).
- * @param WP_REST_Request $request Request used to generate the response.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param WP_HTTP_Response|WP_Error $response Result to send to the client. Usually a WP_REST_Response or WP_Error.
+ * @param array $handler Route handler used for the request.
+ * @param WP_REST_Request $request Request used to generate the response.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $response = apply_filters( 'rest_request_before_callbacks', $response, $handler, $request );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -932,7 +932,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.5.0 Added `$route` and `$handler` parameters.
</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 bool $dispatch_result Dispatch result, will be used if not empty.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param mixed $dispatch_result Dispatch result, will be used if not empty.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param WP_REST_Request $request Request used to generate the response.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $route Route matched for the request.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $handler Route handler used for the request.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -963,9 +963,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.7.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">- * @param WP_HTTP_Response $response Result to send to the client. Usually a WP_REST_Response.
- * @param WP_REST_Server $handler ResponseHandler instance (usually WP_REST_Server).
- * @param WP_REST_Request $request Request used to generate the response.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param WP_HTTP_Response|WP_Error $response Result to send to the client. Usually a WP_REST_Response or WP_Error.
+ * @param array $handler Route handler used for the request.
+ * @param WP_REST_Request $request Request used to generate the response.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $response = apply_filters( 'rest_request_after_callbacks', $response, $handler, $request );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre>
</div>
</div>
</body>
</html>