<!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>[39188] trunk/src/wp-includes: Docs: Improve the documentation for parameters which accept `OBJECT`, `ARRAY_A`, and `ARRAY_N` as parameters.</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 { 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/39188">39188</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/39188","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>2016-11-09 22:59:02 +0000 (Wed, 09 Nov 2016)</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: Improve the documentation for parameters which accept `OBJECT`, `ARRAY_A`, and `ARRAY_N` as parameters.
See <a href="https://core.trac.wordpress.org/ticket/37770">#37770</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludesbookmarkphp">trunk/src/wp-includes/bookmark.php</a></li>
<li><a href="#trunksrcwpincludescategoryphp">trunk/src/wp-includes/category.php</a></li>
<li><a href="#trunksrcwpincludescommentphp">trunk/src/wp-includes/comment.php</a></li>
<li><a href="#trunksrcwpincludespostphp">trunk/src/wp-includes/post.php</a></li>
<li><a href="#trunksrcwpincludesrevisionphp">trunk/src/wp-includes/revision.php</a></li>
<li><a href="#trunksrcwpincludestaxonomyphp">trunk/src/wp-includes/taxonomy.php</a></li>
<li><a href="#trunksrcwpincludeswpdbphp">trunk/src/wp-includes/wp-db.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpincludesbookmarkphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/bookmark.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/bookmark.php 2016-11-09 21:04:04 UTC (rev 39187)
+++ trunk/src/wp-includes/bookmark.php 2016-11-09 22:59:02 UTC (rev 39188)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -14,7 +14,8 @@
</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 int|stdClass $bookmark
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $output Optional. Either OBJECT, ARRAY_N, or ARRAY_A constant
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * an stdClass object, an associative array, or a numeric array, respectively. Default OBJECT.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $filter Optional, default is 'raw'.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array|object|null Type returned depends on $output value.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -300,10 +301,10 @@
</span><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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param object|array $bookmark Bookmark row
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param stdClass|array $bookmark Bookmark row
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $context Optional, default is 'display'. How to filter the
</span><span class="cx" style="display: block; padding: 0 10px"> * fields
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return object|array Same type as $bookmark but with fields sanitized.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return stdClass|array Same type as $bookmark but with fields sanitized.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function sanitize_bookmark($bookmark, $context = 'display') {
</span><span class="cx" style="display: block; padding: 0 10px"> $fields = array('link_id', 'link_url', 'link_name', 'link_image', 'link_target', 'link_category',
</span></span></pre></div>
<a id="trunksrcwpincludescategoryphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/category.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/category.php 2016-11-09 21:04:04 UTC (rev 39187)
+++ trunk/src/wp-includes/category.php 2016-11-09 22:59:02 UTC (rev 39188)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -82,7 +82,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 1.5.1
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int|object $category Category ID or Category row object
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to a
+ * WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $filter Optional. Default is raw or no WordPress defined filter will applied.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return object|array|WP_Error|null Category data in type defined by $output parameter.
</span><span class="cx" style="display: block; padding: 0 10px"> * WP_Error if $category is empty, null if it does not exist.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -113,9 +114,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.1.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $category_path URL containing category slugs.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param bool $full_match Optional. Whether full path should be matched.
- * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
- * @return object|array|WP_Error|void Type is based on $output value.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param bool $full_match Optional. Whether full path should be matched.
+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
+ * @return WP_Term|array|WP_Error|null Type is based on $output value.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_category_by_path( $category_path, $full_match = true, $output = OBJECT ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $category_path = rawurlencode( urldecode( $category_path ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -296,10 +298,11 @@
</span><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><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param int|object $tag
- * @param string $output Optional. Constant OBJECT, ARRAY_A, or ARRAY_N
- * @param string $filter Optional. Default is raw or no WordPress defined filter will applied.
- * @return object|array|WP_Error|null Tag data in type defined by $output parameter. WP_Error if $tag is empty, null if it does not exist.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param int|WP_Term|object $tag A tag ID or object.
+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
+ * @param string $filter Optional. Default is raw or no WordPress defined filter will applied.
+ * @return WP_Term|array|WP_Error|null Tag data in type defined by $output parameter. WP_Error if $tag is empty, null if it 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_tag( $tag, $output = OBJECT, $filter = 'raw' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return get_term( $tag, 'post_tag', $output, $filter );
</span></span></pre></div>
<a id="trunksrcwpincludescommentphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/comment.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/comment.php 2016-11-09 21:04:04 UTC (rev 39187)
+++ trunk/src/wp-includes/comment.php 2016-11-09 22:59:02 UTC (rev 39188)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -170,7 +170,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Comment $comment
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param WP_Comment|string|int $comment Comment to retrieve.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $output Optional. OBJECT or ARRAY_A or ARRAY_N constants.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * a WP_Comment object, an associative array, or a numeric array, respectively. Default OBJECT.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return WP_Comment|array|null Depends on $output value.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_comment( &$comment = null, $output = OBJECT ) {
</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 2016-11-09 21:04:04 UTC (rev 39187)
+++ trunk/src/wp-includes/post.php 2016-11-09 22:59:02 UTC (rev 39188)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -401,8 +401,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Post $post
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param mixed $args Optional. User defined arguments for replacing the defaults. Default empty.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $output Optional. Constant for return type. Accepts OBJECT, ARRAY_A, ARRAY_N.
- * Default OBJECT.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @return array Array of children, where the type of each element is determined by $output parameter.
</span><span class="cx" style="display: block; padding: 0 10px"> * Empty array on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -505,8 +505,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Post $post
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param int|WP_Post|null $post Optional. Post ID or post object. Defaults to global $post.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $output Optional, default is Object. Accepts OBJECT, ARRAY_A, or ARRAY_N.
- * Default OBJECT.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $filter Optional. Type of filter to apply. Accepts 'raw', 'edit', 'db',
</span><span class="cx" style="display: block; padding: 0 10px"> * or 'display'. Default 'raw'.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return WP_Post|array|null Type corresponding to $output on success or null on failure.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2862,9 +2862,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @see get_posts()
</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 $args Optional. Arguments to retrieve posts. Default empty array.
- * @param string $output Optional. Type of output. Accepts ARRAY_A or ''. Default ARRAY_A.
- * @return array|false Associative array if $output equals ARRAY_A, array or false if no results.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param array $args Optional. Arguments to retrieve posts. Default empty array.
+ * @param string $output Optional. The required return type. One of OBJECT or ARRAY_A, which correspond to
+ * a WP_Post object or an associative array, respectively. Default ARRAY_A.
+ * @return array|false Array of recent posts, where the type of each element is determined by $output parameter.
+ * Empty array 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_recent_posts( $args = array(), $output = ARRAY_A ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4190,11 +4192,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @deprecated 3.5.0 Use get_post()
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param mixed $page Page object or page ID. Passed by reference.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $output Optional. What to output. Accepts OBJECT, ARRAY_A, or ARRAY_N.
- * Default OBJECT.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $filter Optional. How the return value should be filtered. Accepts 'raw',
</span><span class="cx" style="display: block; padding: 0 10px"> * 'edit', 'db', 'display'. Default 'raw'.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Post|array|null WP_Post on success or null on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_Post|array|null WP_Post (or array) on success, or null on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_page( $page, $output = OBJECT, $filter = 'raw') {
</span><span class="cx" style="display: block; padding: 0 10px"> return get_post( $page, $output, $filter );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4208,10 +4210,10 @@
</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 string $page_path Page path.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $output Optional. Output type. Accepts OBJECT, ARRAY_N, or ARRAY_A.
- * Default OBJECT.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string|array $post_type Optional. Post type or array of post types. Default 'page'.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Post|array|void WP_Post on success.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_Post|array|null WP_Post (or array) on success, or null on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_page_by_path( $page_path, $output = OBJECT, $post_type = 'page' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4300,10 +4302,10 @@
</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 string $page_title Page title
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $output Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A.
- * Default OBJECT.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string|array $post_type Optional. Post type or array of post types. Default 'page'.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Post|array|void WP_Post on success or null on failure
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_Post|array|null WP_Post (or array) on success, or null on failure.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_page_by_title( $page_title, $output = OBJECT, $post_type = 'page' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wpdb;
</span></span></pre></div>
<a id="trunksrcwpincludesrevisionphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/revision.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/revision.php 2016-11-09 21:04:04 UTC (rev 39187)
+++ trunk/src/wp-includes/revision.php 2016-11-09 22:59:02 UTC (rev 39188)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -321,9 +321,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.6.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 The post ID or object.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $output Optional. OBJECT, ARRAY_A, or ARRAY_N.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $filter Optional sanitation filter. See sanitize_post().
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Post|array|null Null if error or post object if success.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_Post|array|null WP_Post (or array) on success, or null 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_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( !$revision = get_post( $post, OBJECT, $filter ) )
</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 2016-11-09 21:04:04 UTC (rev 39187)
+++ trunk/src/wp-includes/taxonomy.php 2016-11-09 22:59:02 UTC (rev 39188)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -709,7 +709,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * filters and return a `WP_Term` object corresponding to the `$term` data. If `WP_Term`,
</span><span class="cx" style="display: block; padding: 0 10px"> * will return `$term`.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $taxonomy Optional. Taxonomy name that $term is part of.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $output Constant OBJECT, ARRAY_A, or ARRAY_N
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $filter Optional, default is raw or no WordPress defined filter will applied.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array|WP_Term|WP_Error|null Object of the type specified by `$output` on success. When `$output` is 'OBJECT',
</span><span class="cx" style="display: block; padding: 0 10px"> * a WP_Term instance is returned. If taxonomy does not exist, a WP_Error is
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -816,10 +817,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $field Either 'slug', 'name', 'id' (term_id), or 'term_taxonomy_id'
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string|int $value Search for this term value
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $taxonomy Taxonomy name. Optional, if `$field` is 'term_taxonomy_id'.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $output Constant OBJECT, ARRAY_A, or ARRAY_N
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * a WP_Term object, an associative array, or a numeric array, respectively. Default OBJECT.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param string $filter Optional, default is raw or no WordPress defined filter will applied.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @return WP_Term|bool WP_Term instance on success. Will return false if `$taxonomy` does not exist
- * or `$term` was not found.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @return WP_Term|array|false WP_Term instance (or array) on success. Will return false if `$taxonomy` does not exist
+ * or `$term` was not found.
</ins><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function get_term_by( $field, $value, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpincludeswpdbphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/wp-db.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/wp-db.php 2016-11-09 21:04:04 UTC (rev 39187)
+++ trunk/src/wp-includes/wp-db.php 2016-11-09 22:59:02 UTC (rev 39188)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2294,10 +2294,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 0.71
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string|null $query SQL query.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @param string $output Optional. one of ARRAY_A | ARRAY_N | OBJECT constants.
- * Return an associative array (column => value, ...),
- * a numerically indexed array (0 => value, ...) or
- * an object ( ->column = value ), respectively.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
+ * an stdClass object, an associative array, or a numeric array, respectively. Default OBJECT.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @param int $y Optional. Row to return. Indexed from 0.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array|object|null|void Database query result in format specified by $output or null on failure
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span></span></pre>
</div>
</div>
</body>
</html>