<!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>[32641] trunk/src/wp-includes/wp-db.php: Add missing/alter existing doc blocks for `wp-db.php`.</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/32641">32641</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/32641","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>wonderboymusic</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-05-28 20:09:54 +0000 (Thu, 28 May 2015)</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'>Add missing/alter existing doc blocks for `wp-db.php`.

See <a href="https://core.trac.wordpress.org/ticket/32444">#32444</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpincludeswpdbphp">trunk/src/wp-includes/wp-db.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<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   2015-05-28 16:33:31 UTC (rev 32640)
+++ trunk/src/wp-includes/wp-db.php     2015-05-28 20:09:54 UTC (rev 32641)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -607,10 +607,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @link https://core.trac.wordpress.org/ticket/3354
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 2.0.8
</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 $dbuser MySQL database user
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @global string $wp_version
+        *
+        * @param string $dbuser     MySQL database user
</ins><span class="cx" style="display: block; padding: 0 10px">          * @param string $dbpassword MySQL database password
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param string $dbname MySQL database name
-        * @param string $dbhost MySQL database host
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string $dbname     MySQL database name
+        * @param string $dbhost     MySQL database host
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) {
</span><span class="cx" style="display: block; padding: 0 10px">                register_shutdown_function( array( $this, '__destruct' ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -652,7 +654,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @see wpdb::__construct()
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 2.0.8
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return bool true
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return true
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function __destruct() {
</span><span class="cx" style="display: block; padding: 0 10px">                return true;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -859,8 +861,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 2.5.0
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param string $prefix Alphanumeric name for the new prefix.
-        * @param bool $set_table_names Optional. Whether the table names, e.g. wpdb::$posts, should be updated or not.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string $prefix          Alphanumeric name for the new prefix.
+        * @param bool   $set_table_names Optional. Whether the table names, e.g. wpdb::$posts, should be updated or not.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return string|WP_Error Old prefix or WP_Error on error
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function set_prefix( $prefix, $set_table_names = true ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -898,6 +900,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 3.0.0
</span><span class="cx" style="display: block; padding: 0 10px">         * @access public
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         *
</ins><span class="cx" style="display: block; padding: 0 10px">          * @param int $blog_id
</span><span class="cx" style="display: block; padding: 0 10px">         * @param int $site_id Optional.
</span><span class="cx" style="display: block; padding: 0 10px">         * @return int previous blog id
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -962,10 +965,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @uses wpdb::$global_tables
</span><span class="cx" style="display: block; padding: 0 10px">         * @uses wpdb::$ms_global_tables
</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 $scope Optional. Can be all, global, ms_global, blog, or old tables. Defaults to all.
-        * @param bool $prefix Optional. Whether to include table prefixes. Default true. If blog
-        *      prefix is requested, then the custom users and usermeta tables will be mapped.
-        * @param int $blog_id Optional. The blog_id to prefix. Defaults to wpdb::$blogid. Used only when prefix is requested.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string $scope   Optional. Can be all, global, ms_global, blog, or old tables. Defaults to all.
+        * @param bool   $prefix  Optional. Whether to include table prefixes. Default true. If blog
+        *                        prefix is requested, then the custom users and usermeta tables will be mapped.
+        * @param int    $blog_id Optional. The blog_id to prefix. Defaults to wpdb::$blogid. Used only when prefix is requested.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return array Table names. When a prefix is requested, the key is the unprefixed table name.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function tables( $scope = 'all', $prefix = true, $blog_id = 0 ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1025,9 +1028,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 0.71
</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 $db MySQL database name
-        * @param resource $dbh Optional link identifier.
-        * @return null Always null.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string        $db  MySQL database name
+        * @param resource|null $dbh Optional link identifier.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function select( $db, $dbh = null ) {
</span><span class="cx" style="display: block; padding: 0 10px">                if ( is_null($dbh) )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1051,7 +1053,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> </ul>
</span><span class="cx" style="display: block; padding: 0 10px"> <p>If you don\'t know how to set up a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href="https://wordpress.org/support/">WordPress Support Forums</a>.</p>' ), htmlspecialchars( $db, ENT_QUOTES ), htmlspecialchars( $this->dbuser, ENT_QUOTES ) ), 'db_select_fail' );
</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;
</del><span class="cx" style="display: block; padding: 0 10px">                 }
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1163,9 +1164,10 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Escapes content by reference for insertion into the database, for security
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @uses wpdb::_real_escape()
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         *
</ins><span class="cx" style="display: block; padding: 0 10px">          * @since 2.3.0
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         *
</ins><span class="cx" style="display: block; padding: 0 10px">          * @param string $string to escape
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return void
</del><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function escape_by_ref( &$string ) {
</span><span class="cx" style="display: block; padding: 0 10px">                if ( ! is_float( $string ) )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1198,14 +1200,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @link http://php.net/sprintf Description of syntax.
</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 string $query Query statement with sprintf()-like placeholders
-        * @param array|mixed $args The array of variables to substitute into the query's placeholders if being called like
-        *      {@link http://php.net/vsprintf vsprintf()}, or the first variable to substitute into the query's placeholders if
-        *      being called like {@link http://php.net/sprintf sprintf()}.
-        * @param mixed $args,... further variables to substitute into the query's placeholders if being called like
-        *      {@link http://php.net/sprintf sprintf()}.
-        * @return null|false|string Sanitized query string, null if there is no query, false if there is an error and string
-        *      if there was something to prepare
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string      $query    Query statement with sprintf()-like placeholders
+        * @param array|mixed $args     The array of variables to substitute into the query's placeholders if being called like
+        *                              {@link http://php.net/vsprintf vsprintf()}, or the first variable to substitute into the query's placeholders if
+        *                              being called like {@link http://php.net/sprintf sprintf()}.
+        * @param mixed       $args,... further variables to substitute into the query's placeholders if being called like
+        *                              {@link http://php.net/sprintf sprintf()}.
+        * @return string|void Sanitized query string, if there is a query to prepare.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function prepare( $query, $args ) {
</span><span class="cx" style="display: block; padding: 0 10px">                if ( is_null( $query ) )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1262,7 +1263,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @global array $EZSQL_ERROR Stores error information of query and error string
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @param string $str The error to display
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return false|null False if the showing of errors is disabled.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return false|void False if the showing of errors is disabled.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function print_error( $str = '' ) {
</span><span class="cx" style="display: block; padding: 0 10px">                global $EZSQL_ERROR;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1367,7 +1368,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Kill cached query results.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 0.71
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return void
</del><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function flush() {
</span><span class="cx" style="display: block; padding: 0 10px">                $this->last_result = array();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1404,10 +1404,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 3.9.0 $allow_bail parameter added.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @param bool $allow_bail Optional. Allows the function to bail. Default true.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return null|bool True with a successful connection, false on failure.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return bool True with a successful connection, false on failure.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function db_connect( $allow_bail = true ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
</del><span class="cx" style="display: block; padding: 0 10px">                 $this->is_mysql = true;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                /*
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1529,7 +1528,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 3.9.0
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @param bool $allow_bail Optional. Allows the function to bail. Default true.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return bool|null True if the connection is up.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return bool|void True if the connection is up.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function check_connection( $allow_bail = true ) {
</span><span class="cx" style="display: block; padding: 0 10px">                if ( $this->use_mysqli ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1759,10 +1758,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @see wpdb::$field_types
</span><span class="cx" style="display: block; padding: 0 10px">         * @see wp_set_wpdb_vars()
</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 $table table name
-        * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
-        * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data.
-        *      A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string       $table  Table name
+        * @param array        $data   Data to insert (in column => value pairs).
+        *                             Both $data columns and $data values should be "raw" (neither should be SQL escaped).
+        * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data.
+        *                             If string, that format will be used for all of the values in $data.
+        *                             A format is one of '%d', '%f', '%s' (integer, float, string).
+        *                             If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return int|false The number of rows inserted, or false on error.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function insert( $table, $data, $format = null ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1780,10 +1782,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @see wpdb::$field_types
</span><span class="cx" style="display: block; padding: 0 10px">         * @see wp_set_wpdb_vars()
</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 $table table name
-        * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
-        * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data.
-        *      A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string       $table  Table name
+        * @param array        $data   Data to insert (in column => value pairs).
+        *                             Both $data columns and $data values should be "raw" (neither should be SQL escaped).
+        * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data.
+        *                             If string, that format will be used for all of the values in $data.
+        *                             A format is one of '%d', '%f', '%s' (integer, float, string).
+        *                             If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return int|false The number of rows affected, or false on error.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function replace( $table, $data, $format = null ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1801,11 +1806,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @see wpdb::$field_types
</span><span class="cx" style="display: block; padding: 0 10px">         * @see wp_set_wpdb_vars()
</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 $table table name
-        * @param array $data Data to insert (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
-        * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data.
-        *      A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
-        * @param string $type Optional. What type of operation is this? INSERT or REPLACE. Defaults to INSERT.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string       $table  Table name
+        * @param array        $data   Data to insert (in column => value pairs).
+        *                             Both $data columns and $data values should be "raw" (neither should be SQL escaped).
+        * @param array|string $format Optional. An array of formats to be mapped to each of the value in $data.
+        *                             If string, that format will be used for all of the values in $data.
+        *                             A format is one of '%d', '%f', '%s' (integer, float, string).
+        *                             If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
+        * @param string $type         Optional. What type of operation is this? INSERT or REPLACE. Defaults to INSERT.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return int|false The number of rows affected, or false on error.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1846,12 +1854,20 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @see wpdb::$field_types
</span><span class="cx" style="display: block; padding: 0 10px">         * @see wp_set_wpdb_vars()
</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 $table table name
-        * @param array $data Data to update (in column => value pairs). Both $data columns and $data values should be "raw" (neither should be SQL escaped).
-        * @param array $where A named array of WHERE clauses (in column => value pairs). Multiple clauses will be joined with ANDs. Both $where columns and $where values should be "raw".
-        * @param array|string $format Optional. An array of formats to be mapped to each of the values in $data. If string, that format will be used for all of the values in $data.
-        *      A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
-        * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where. A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $where will be treated as strings.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string       $table        Table name
+        * @param array        $data         Data to update (in column => value pairs).
+        *                                   Both $data columns and $data values should be "raw" (neither should be SQL escaped).
+        * @param array        $where        A named array of WHERE clauses (in column => value pairs).
+        *                                   Multiple clauses will be joined with ANDs.
+        *                                   Both $where columns and $where values should be "raw".
+        * @param array|string $format       Optional. An array of formats to be mapped to each of the values in $data.
+        *                                   If string, that format will be used for all of the values in $data.
+        *                                   A format is one of '%d', '%f', '%s' (integer, float, string).
+        *                                   If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.
+        * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where.
+        *                                   If string, that format will be used for all of the items in $where.
+        *                                   A format is one of '%d', '%f', '%s' (integer, float, string).
+        *                                   If omitted, all values in $where will be treated as strings.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return int|false The number of rows updated, or false on error.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function update( $table, $data, $where, $format = null, $where_format = null ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1898,9 +1914,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @see wpdb::$field_types
</span><span class="cx" style="display: block; padding: 0 10px">         * @see wp_set_wpdb_vars()
</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 $table table name
-        * @param array $where A named array of WHERE clauses (in column => value pairs). Multiple clauses will be joined with ANDs. Both $where columns and $where values should be "raw".
-        * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where. If string, that format will be used for all of the items in $where. A format is one of '%d', '%f', '%s' (integer, float, string). If omitted, all values in $where will be treated as strings unless otherwise specified in wpdb::$field_types.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string       $table        Table name
+        * @param array        $where        A named array of WHERE clauses (in column => value pairs).
+        *                                   Multiple clauses will be joined with ANDs.
+        *                                   Both $where columns and $where values should be "raw".
+        * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where.
+        *                                   If string, that format will be used for all of the items in $where.
+        *                                   A format is one of '%d', '%f', '%s' (integer, float, string).
+        *                                   If omitted, all values in $where will be treated as strings unless otherwise specified in wpdb::$field_types.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return int|false The number of rows updated, or false on error.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function delete( $table, $where, $where_format = null ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1942,7 +1963,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @param string $table  Table name.
</span><span class="cx" style="display: block; padding: 0 10px">         * @param array  $data   Field/value pair.
</span><span class="cx" style="display: block; padding: 0 10px">         * @param mixed  $format Format for each field.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return array|bool Returns an array of fields that contain paired values
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return array|false Returns an array of fields that contain paired values
</ins><span class="cx" style="display: block; padding: 0 10px">          *                    and formats. Returns false for invalid values.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        protected function process_fields( $table, $data, $format ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2014,7 +2035,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @param array  $data  As it comes from the wpdb::process_field_formats() method.
</span><span class="cx" style="display: block; padding: 0 10px">         * @param string $table Table name.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return The same array as $data with additional 'charset' keys.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return array|false The same array as $data with additional 'charset' keys.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        protected function process_field_charsets( $data, $table ) {
</span><span class="cx" style="display: block; padding: 0 10px">                foreach ( $data as $field => $value ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2043,7 +2064,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @param array  $data  As it comes from the wpdb::process_field_charsets() method.
</span><span class="cx" style="display: block; padding: 0 10px">         * @param string $table Table name.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return array|False The same array as $data with additional 'length' keys, or false if
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return array|false The same array as $data with additional 'length' keys, or false if
</ins><span class="cx" style="display: block; padding: 0 10px">          *                     any of the values were too long for their corresponding field.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        protected function process_field_lengths( $data, $table ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2075,8 +2096,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 Optional. SQL query. Defaults to null, use the result from the previous query.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param int $x Optional. Column of value to return. Indexed from 0.
-        * @param int $y Optional. Row of value to return. Indexed from 0.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param int         $x     Optional. Column of value to return. Indexed from 0.
+        * @param int         $y     Optional. Row of value to return. Indexed from 0.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return string|null Database query result (as string), or null on failure
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function get_var( $query = null, $x = 0, $y = 0 ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2106,11 +2127,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 0.71
</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|null $query SQL query.
-        * @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.
-        * @param int $y Optional. Row to return. Indexed from 0.
-        * @return mixed Database query result in format specified by $output or null on failure
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string|null $query  SQL query.
+        * @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.
+        * @param int         $y      Optional. Row to return. Indexed from 0.
+        * @return array|object|null|void Database query result in format specified by $output or null on failure
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function get_row( $query = null, $output = OBJECT, $y = 0 ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $this->func_call = "\$db->get_row(\"$query\",$output,$y)";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2152,7 +2175,7 @@
</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 Optional. SQL query. Defaults to previous query.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @param int $x Optional. Column to return. Indexed from 0.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param int         $x     Optional. Column to return. Indexed from 0.
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return array Database query result. Array indexed from 0 by SQL result row number.
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function get_col( $query = null , $x = 0 ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2179,11 +2202,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 0.71
</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 $query SQL query.
-        * @param string $output Optional. Any of ARRAY_A | ARRAY_N | OBJECT | OBJECT_K constants. With one of the first three, return an array of rows indexed from 0 by SQL result row number.
-        *      Each row is an associative array (column => value, ...), a numerically indexed array (0 => value, ...), or an object. ( ->column = value ), respectively.
-        *      With OBJECT_K, return an associative array of row objects keyed by the value of each row's first column's value. Duplicate keys are discarded.
-        * @return mixed Database query results
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string $query  SQL query.
+        * @param string $output Optional. Any of ARRAY_A | ARRAY_N | OBJECT | OBJECT_K constants.
+        *                       With one of the first three, return an array of rows indexed from 0 by SQL result row number.
+        *                       Each row is an associative array (column => value, ...), a numerically indexed array (0 => value, ...), or an object. ( ->column = value ), respectively.
+        *                       With OBJECT_K, return an associative array of row objects keyed by the value of each row's first column's value.
+        *                       Duplicate keys are discarded.
+        * @return array|object|null Database query results
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function get_results( $query = null, $output = OBJECT ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $this->func_call = "\$db->get_results(\"$query\", $output)";
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2342,8 +2367,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @param string $table  Table name.
</span><span class="cx" style="display: block; padding: 0 10px">         * @param string $column Column name.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return mixed Column character set as a string. False if the column has no
-        *               character set. WP_Error object if there was an error.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return string|false|WP_Error Column character set as a string. False if the column has no
+        *                               character set. WP_Error object if there was an error.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function get_col_charset( $table, $column ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $tablekey = strtolower( $table );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2407,9 +2432,9 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @param string $table  Table name.
</span><span class="cx" style="display: block; padding: 0 10px">         * @param string $column Column name.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return mixed array( 'length' => (int), 'type' => 'byte' | 'char' )
-        *               false if the column has no length (for example, numeric column)
-        *               WP_Error object if there was an error.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return array|false|WP_Error array( 'length' => (int), 'type' => 'byte' | 'char' )
+        *                              false if the column has no length (for example, numeric column)
+        *                              WP_Error object if there was an error.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function get_col_length( $table, $column ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $tablekey = strtolower( $table );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2910,8 +2935,8 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 0.71
</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 $info_type Optional. Type one of name, table, def, max_length, not_null, primary_key, multiple_key, unique_key, numeric, blob, type, unsigned, zerofill
-        * @param int $col_offset Optional. 0: col name. 1: which table the col's in. 2: col's max length. 3: if the col is numeric. 4: col's type
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string $info_type  Optional. Type one of name, table, def, max_length, not_null, primary_key, multiple_key, unique_key, numeric, blob, type, unsigned, zerofill
+        * @param int    $col_offset Optional. 0: col name. 1: which table the col's in. 2: col's max length. 3: if the col is numeric. 4: col's type
</ins><span class="cx" style="display: block; padding: 0 10px">          * @return mixed Column Results
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="cx" style="display: block; padding: 0 10px">        public function get_col_info( $info_type = 'name', $col_offset = -1 ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2937,7 +2962,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 bool
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return true
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function timer_start() {
</span><span class="cx" style="display: block; padding: 0 10px">                $this->time_start = microtime( true );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2962,7 +2987,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">-         * @param string $message The Error message
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @param string $message    The Error message
</ins><span class="cx" style="display: block; padding: 0 10px">          * @param string $error_code Optional. A Computer readable string to identify the error.
</span><span class="cx" style="display: block; padding: 0 10px">         * @return false|void
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2981,10 +3006,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * Whether MySQL database is at least the required minimum version.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 2.5.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @uses $wp_version
-        * @uses $required_mysql_version
</del><span class="cx" style="display: block; padding: 0 10px">          *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return WP_Error
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @global string $wp_version
+        * @global string $required_mysql_version
+        *
+        * @return WP_Error|void
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function check_database_version() {
</span><span class="cx" style="display: block; padding: 0 10px">                global $wp_version, $required_mysql_version;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3038,7 +3064,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @param string $db_cap The feature to check for. Accepts 'collation',
</span><span class="cx" style="display: block; padding: 0 10px">         *                       'group_concat', 'subqueries', 'set_charset',
</span><span class="cx" style="display: block; padding: 0 10px">         *                       or 'utf8mb4'.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return bool Whether the database feature is supported, false otherwise.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return int|false Whether the database feature is supported, false otherwise.
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function has_cap( $db_cap ) {
</span><span class="cx" style="display: block; padding: 0 10px">                $version = $this->db_version();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3083,7 +3109,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 2.5.0
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-         * @return string The name of the calling function
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+  * @return string|array The name of the calling function
</ins><span class="cx" style="display: block; padding: 0 10px">          */
</span><span class="cx" style="display: block; padding: 0 10px">        public function get_caller() {
</span><span class="cx" style="display: block; padding: 0 10px">                return wp_debug_backtrace_summary( __CLASS__ );
</span></span></pre>
</div>
</div>

</body>
</html>