<!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>[49789] trunk: Docs: Various docblock corrections.</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/49789">49789</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/49789","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>2020-12-10 23:51:52 +0000 (Thu, 10 Dec 2020)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Docs: Various docblock corrections.
See <a href="https://core.trac.wordpress.org/ticket/51800">#51800</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesclasswpposttypephp">trunk/src/wp-includes/class-wp-post-type.php</a></li>
<li><a href="#trunksrcwpincludesclasswpqueryphp">trunk/src/wp-includes/class-wp-query.php</a></li>
<li><a href="#trunksrcwpincludesclasswptermphp">trunk/src/wp-includes/class-wp-term.php</a></li>
<li><a href="#trunksrcwpincludeslinktemplatephp">trunk/src/wp-includes/link-template.php</a></li>
<li><a href="#trunksrcwpincludespostphp">trunk/src/wp-includes/post.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>
<li><a href="#trunktestsphpunitincludesfactoryclasswpunittestfactoryforpostphp">trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesclasswpposttypephp"></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-post-type.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-post-type.php 2020-12-10 23:36:11 UTC (rev 49788)
+++ trunk/src/wp-includes/class-wp-post-type.php 2020-12-10 23:51:52 UTC (rev 49789)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -123,7 +123,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Default is the value of $show_ui.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.6.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @var bool $show_in_menu
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @var bool|string $show_in_menu
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public $show_in_menu = null;
</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 2020-12-10 23:36:11 UTC (rev 49788)
+++ trunk/src/wp-includes/class-wp-query.php 2020-12-10 23:51:52 UTC (rev 49789)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1730,7 +1730,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.9.0 The `$default` argument was introduced.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $query_var Query variable key.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param mixed $default Optional. Value to return if the query variable is not set. Default empty.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param mixed $default Optional. Value to return if the query variable is not set. Default empty string.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return mixed Contents of the query variable.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function get( $query_var, $default = '' ) {
</span></span></pre></div>
<a id="trunksrcwpincludesclasswptermphp"></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.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-term.php 2020-12-10 23:36:11 UTC (rev 49788)
+++ trunk/src/wp-includes/class-wp-term.php 2020-12-10 23:51:52 UTC (rev 49789)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -44,7 +44,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * The term's term_group.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.4.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @var string
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @var int
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public $term_group = '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -204,7 +204,7 @@
</span><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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $filter Filter context. Accepts 'edit', 'db', 'display', 'attribute', 'js', 'raw'.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $filter Filter context. Accepts 'edit', 'db', 'display', 'attribute', 'js', 'rss', or 'raw'.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function filter( $filter ) {
</span><span class="cx" style="display: block; padding: 0 10px"> sanitize_term( $this, $this->taxonomy, $filter );
</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 2020-12-10 23:36:11 UTC (rev 49788)
+++ trunk/src/wp-includes/link-template.php 2020-12-10 23:51:52 UTC (rev 49789)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1700,7 +1700,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @global wpdb $wpdb WordPress database abstraction object.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. Default false.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int[]|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. Default empty string.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param bool $previous Optional. Whether to retrieve previous post. Default true
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1748,7 +1748,7 @@
</span><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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param array $excluded_terms Array of excluded term IDs.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array|string $excluded_terms Array of excluded term IDs. Empty string if none were provided.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $excluded_terms = apply_filters( "get_{$adjacent}_post_excluded_terms", $excluded_terms );
</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 2020-12-10 23:36:11 UTC (rev 49788)
+++ trunk/src/wp-includes/post.php 2020-12-10 23:51:52 UTC (rev 49789)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1393,7 +1393,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @type bool $feeds Whether the feed permastruct should be built for this post type.
</span><span class="cx" style="display: block; padding: 0 10px"> * Default is value of $has_archive.
</span><span class="cx" style="display: block; padding: 0 10px"> * @type bool $pages Whether the permastruct should provide for pagination. Default true.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @type const $ep_mask Endpoint mask to assign. If not specified and permalink_epmask is set,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type int $ep_mask Endpoint mask to assign. If not specified and permalink_epmask is set,
</ins><span class="cx" style="display: block; padding: 0 10px"> * inherits from $permalink_epmask. If not specified and permalink_epmask
</span><span class="cx" style="display: block; padding: 0 10px"> * is not set, defaults to EP_PERMALINK.
</span><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2334,8 +2334,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param object|WP_Post|array $post The post object or array
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $context Optional. How to sanitize post fields.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Accepts 'raw', 'edit', 'db', or 'display'.
- * Default 'display'.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Accepts 'raw', 'edit', 'db', 'display',
+ * 'attribute', or 'js'. Default 'display'.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return object|WP_Post|array The now sanitized post object or array (will be the
</span><span class="cx" style="display: block; padding: 0 10px"> * same type as `$post`).
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2507,9 +2507,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param mixed $value Value of the prefixed post field.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $post_id Post ID.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $context Context for how to sanitize the field. Possible
- * values include 'edit', 'display',
- * 'attribute' and 'js'.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $context Context for how to sanitize the field.
+ * Accepts 'raw', 'edit', 'db', 'display',
+ * 'attribute', or 'js'. Default 'display'.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> $value = apply_filters( "{$field}", $value, $post_id, $context );
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</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 2020-12-10 23:36:11 UTC (rev 49788)
+++ trunk/src/wp-includes/taxonomy.php 2020-12-10 23:51:52 UTC (rev 49789)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1509,20 +1509,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"> /**
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Sanitize Term all fields.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Sanitize all term fields.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * Relies on sanitize_term_field() to sanitize the term. The difference is that
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * this function will sanitize <strong>all</strong> fields. The context is based
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * this function will sanitize **all** fields. The context is based
</ins><span class="cx" style="display: block; padding: 0 10px"> * on sanitize_term_field().
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * The $term is expected to be either an array or an object.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * The `$term` is expected to be either an array or an object.
</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="cx" style="display: block; padding: 0 10px"> * @param array|object $term The term to check.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $taxonomy The taxonomy name to use.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $context Optional. Context in which to sanitize the term. Accepts 'edit', 'db',
- * 'display', 'attribute', or 'js'. Default 'display'.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $context Optional. Context in which to sanitize the term.
+ * Accepts 'raw', 'edit', 'db', 'display', 'rss',
+ * 'attribute', or 'js'. Default 'display'.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return array|object Term with all fields sanitized.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function sanitize_term( $term, $taxonomy, $context = 'display' ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1572,8 +1573,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $value Search for this term value.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $term_id Term ID.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $taxonomy Taxonomy Name.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $context Context in which to sanitize the term field. Accepts 'edit', 'db', 'display',
- * 'attribute', or 'js'.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $context Context in which to sanitize the term field.
+ * Accepts 'raw', 'edit', 'db', 'display', 'rss',
+ * 'attribute', or 'js'. Default 'display'.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return mixed Sanitized field.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function sanitize_term_field( $field, $value, $term_id, $taxonomy, $context ) {
</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 2020-12-10 23:36:11 UTC (rev 49788)
+++ trunk/src/wp-includes/user.php 2020-12-10 23:51:52 UTC (rev 49789)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -306,7 +306,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * callback failed authentication.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $username Username for authentication.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $password Password for authentication.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_User|WP_Error WP_User on success, WP_Error on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_User|WP_Error|null WP_User on success, WP_Error on failure, null if
+ * null is passed in and this isn't an API request.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_authenticate_application_password( $input_user, $username, $password ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $input_user instanceof WP_User ) {
</span></span></pre></div>
<a id="trunktestsphpunitincludesfactoryclasswpunittestfactoryforpostphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php 2020-12-10 23:36:11 UTC (rev 49788)
+++ trunk/tests/phpunit/includes/factory/class-wp-unittest-factory-for-post.php 2020-12-10 23:51:52 UTC (rev 49789)
</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"> * @param array $args Array with elements for the post.
</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 int|WP_Error The post ID on success. The value 0 or WP_Error on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return int The post ID on success. The value 0 on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function create_object( $args ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return wp_insert_post( $args );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -40,7 +40,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int $post_id ID of the post to update.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $fields Post 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">- * @return int|WP_Error The post ID on success. The value 0 or WP_Error on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return int The post ID on success. The value 0 on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function update_object( $post_id, $fields ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $fields['ID'] = $post_id;
</span></span></pre>
</div>
</div>
</body>
</html>