diff --git a/wp-includes/version.php b/wp-includes/version.php index 9dd0bac497..a3800c2702 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-47739'; +$wp_version = '5.5-alpha-47740'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 4b71bd7de1..8d425db633 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -1,6 +1,6 @@ $name ); @@ -773,7 +768,7 @@ class wpdb { * * @since 3.1.0 * - * @param resource $dbh The resource given by mysql_connect + * @param resource $dbh The resource given by mysql_connect. * @param string $charset Optional. The character set. Default null. * @param string $collate Optional. The collation. Default null. */ @@ -817,8 +812,7 @@ class wpdb { /** * Change the current SQL mode, and ensure its WordPress compatibility. * - * If no modes are passed, it will ensure the current MySQL server - * modes are compatible. + * If no modes are passed, it will ensure the current MySQL server modes are compatible. * * @since 3.9.0 * @@ -886,7 +880,7 @@ class wpdb { * * @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. - * @return string|WP_Error Old prefix or WP_Error on error + * @return string|WP_Error Old prefix or WP_Error on error. */ public function set_prefix( $prefix, $set_table_names = true ) { @@ -931,7 +925,7 @@ class wpdb { * * @param int $blog_id * @param int $network_id Optional. - * @return int previous blog id + * @return int Previous blog id. */ public function set_blog_id( $blog_id, $network_id = 0 ) { if ( ! empty( $network_id ) ) { @@ -980,11 +974,10 @@ class wpdb { /** * Returns an array of WordPress tables. * - * Also allows for the CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE to - * override the WordPress users and usermeta tables that would otherwise - * be determined by the prefix. + * Also allows for the CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE to override the WordPress users and usermeta + * tables that would otherwise be determined by the prefix. * - * The scope argument can take one of the following: + * The $scope argument can take one of the following: * * 'all' - returns 'all' and 'global' tables. No old tables are returned. * 'blog' - returns the blog-level tables for the queried blog. @@ -1062,8 +1055,8 @@ class wpdb { /** * Selects a database using the current database connection. * - * The database name will be changed based on the current database - * connection. On failure, the execution will bail and display an DB error. + * The database name will be changed based on the current database connection. On failure, the execution will + * bail and display a DB error. * * @since 0.71 * @@ -1149,8 +1142,8 @@ class wpdb { * @see mysql_real_escape_string() * @since 2.8.0 * - * @param string $string to escape - * @return string escaped + * @param string $string String to escape. + * @return string Escaped string. */ function _real_escape( $string ) { if ( $this->dbh ) { @@ -1177,10 +1170,10 @@ class wpdb { * Escape data. Works on arrays. * * @uses wpdb::_real_escape() - * @since 2.8.0 + * @since 2.8.0 * - * @param string|array $data - * @return string|array escaped + * @param string|array $data Data to escape. + * @return string|array Escaped data, in the same type as supplied. */ public function _escape( $data ) { if ( is_array( $data ) ) { @@ -1231,13 +1224,13 @@ class wpdb { } /** - * Escapes content by reference for insertion into the database, for security + * Escapes content by reference for insertion into the database, for security. * * @uses wpdb::_real_escape() * * @since 2.3.0 * - * @param string $string to escape + * @param string $string String to escape. */ public function escape_by_ref( &$string ) { if ( ! is_float( $string ) ) { @@ -1246,26 +1239,26 @@ class wpdb { } /** - * Prepares a SQL query for safe execution. Uses sprintf()-like syntax. + * Prepares a SQL query for safe execution. * - * The following placeholders can be used in the query string: + * Uses sprintf()-like syntax. The following placeholders can be used in the query string: * %d (integer) * %f (float) * %s (string) * - * All placeholders MUST be left unquoted in the query string. A corresponding argument - * MUST be passed for each placeholder. + * All placeholders MUST be left unquoted in the query string. A corresponding argument MUST be passed for each + * placeholder. * - * For compatibility with old behavior, numbered or formatted string placeholders (eg, %1$s, %5s) - * will not have quotes added by this function, so should be passed with appropriate quotes around - * them for your usage. + * Note: There is one exception to the above: for compatibility with old behavior, older-style numbered or formatted + * string placeholders (eg, %1$s, %5s) will not have quotes added by this function, so should be passed with + * appropriate quotes around them. * * Literal percentage signs (%) in the query string must be written as %%. Percentage wildcards (for example, * to use in LIKE syntax) must be passed via a substitution argument containing the complete LIKE string, these * cannot be inserted directly in the query string. Also see wpdb::esc_like(). * - * Arguments may be passed as individual arguments to the method, or as a single array containing - * all arguments. A combination of the two is not supported. + * Arguments may be passed as individual arguments to the method, or as a single array containing all arguments. + * A combination of the two is not supported. * * Examples: * $wpdb->prepare( "SELECT * FROM `table` WHERE `column` = %s AND `field` = %d OR `other_field` LIKE %s", array( 'foo', 1337, '%bar' ) ); @@ -1277,13 +1270,13 @@ class wpdb { * by updating the function signature. The second parameter was changed * from `$args` to `...$args`. * - * @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 with an array of arguments, or the first variable - * to substitute into the query's placeholders if being called with + * @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 + * with an array of arguments, or the first variable to substitute into the query's + * placeholders if being called with individual arguments. + * @param mixed ...$args Further variables to substitute into the query's placeholders if being called with * individual arguments. - * @param mixed ...$args Further variables to substitute into the query's placeholders - * if being called with individual arguments. + * * @return string|void Sanitized query string, if there is a query to prepare. */ public function prepare( $query, ...$args ) { @@ -1423,9 +1416,9 @@ class wpdb { * Print SQL/DB error. * * @since 0.71 - * @global array $EZSQL_ERROR Stores error information of query and error string. + * @global array $EZSQL_ERROR Stores error information of query and error string * - * @param string $str The error to display. + * @param string $str The error to display * @return void|false Void if the showing of errors is enabled, false if disabled. */ public function print_error( $str = '' ) { @@ -1496,16 +1489,16 @@ class wpdb { /** * Enables showing of database errors. * - * This function should be used only to enable showing of errors. - * wpdb::hide_errors() should be used instead for hiding of errors. However, - * this function can be used to enable and disable showing of database - * errors. + * This function should be used only to enable showing of errors. wpdb::hide_errors() should be used instead for + * hiding of errors. However, this function can be used to enable and disable showing of database errors. + * + * @see wpdb::hide_errors() * * @since 0.71 * @see wpdb::hide_errors() * - * @param bool $show Whether to show or hide errors - * @return bool Old value for showing errors. + * @param bool $show Whether to show or hide errors. + * @return bool Whether showing of errors was previously active. */ public function show_errors( $show = true ) { $errors = $this->show_errors; @@ -1521,7 +1514,7 @@ class wpdb { * @since 0.71 * @see wpdb::show_errors() * - * @return bool Whether showing of errors was active + * @return bool Whether showing of errors was previously active. */ public function hide_errors() { $show = $this->show_errors; @@ -1532,11 +1525,11 @@ class wpdb { /** * Whether to suppress database errors. * - * By default database errors are suppressed, with a simple - * call to this function they can be enabled. + * By default database errors are suppressed, with a simple call to this function they can be enabled. * * @since 2.5.0 * @see wpdb::hide_errors() + * * @param bool $suppress Optional. New value. Defaults to true. * @return bool Old value */ @@ -1580,8 +1573,7 @@ class wpdb { /** * Connect to and select database. * - * If $allow_bail is false, the lack of database connection will need - * to be handled manually. + * If $allow_bail is false, the lack of database connection will need to be handled manually. * * @since 3.0.0 * @since 3.9.0 $allow_bail parameter added. @@ -1717,9 +1709,8 @@ class wpdb { /** * Parse the DB_HOST setting to interpret it for mysqli_real_connect. * - * mysqli_real_connect doesn't support the host param including a port or - * socket like mysql_connect does. This duplicates how mysql_connect detects - * a port and/or socket file. + * mysqli_real_connect doesn't support the host param including a port or socket like mysql_connect does. This + * duplicates how mysql_connect detects a port and/or socket file. * * @since 4.9.0 * @@ -1771,11 +1762,10 @@ class wpdb { /** * Checks that the connection to the database is still up. If not, try to reconnect. * - * If this function is unable to reconnect, it will forcibly die, or if after the - * the {@see 'template_redirect'} hook has been fired, return false instead. + * If this function is unable to reconnect, it will forcibly die, or if after the {@see 'template_redirect'} hook + * has been fired, return false instead. * - * If $allow_bail is false, the lack of database connection will need - * to be handled manually. + * If $allow_bail is false, the lack of database connection will need to be handled manually. * * @since 3.9.0 * @@ -1802,8 +1792,8 @@ class wpdb { } for ( $tries = 1; $tries <= $this->reconnect_retries; $tries++ ) { - // On the last try, re-enable warnings. We want to see a single instance - // of the "unable to connect" message on the bail() screen, if it appears. + // On the last try, re-enable warnings. We want to see a single instance of the + // "unable to connect" message on the bail() screen, if it appears. if ( $this->reconnect_retries === $tries && WP_DEBUG ) { error_reporting( $error_reporting ); } @@ -1853,8 +1843,7 @@ class wpdb { // We weren't able to reconnect, so we better bail. $this->bail( $message, 'db_connect_fail' ); - // Call dead_db() if bail didn't die, because this database is no more. - // It has ceased to be (at least temporarily). + // Call dead_db() if bail didn't die, because this database is no more. It has ceased to be (at least temporarily). dead_db(); } @@ -1997,8 +1986,7 @@ class wpdb { } } - // Log number of rows the query returned - // and return number of rows selected. + // Log number of rows the query returned and return number of rows selected. $this->num_rows = $num_rows; $return_val = $num_rows; } @@ -2138,6 +2126,7 @@ class wpdb { /** * Insert a row into a table. * + * Examples: * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 'bar' ) ) * wpdb::insert( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) ) * @@ -2146,14 +2135,16 @@ class wpdb { * @see wpdb::$field_types * @see wp_set_wpdb_vars() * - * @param string $table Table name + * @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). - * Sending a null value will cause the column to be set to NULL - the corresponding format is ignored in this case. + * Sending a null value will cause the column to be set to NULL - the corresponding + * format is ignored in this case. * @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. + * If omitted, all values in $data will be treated as strings unless otherwise + * specified in wpdb::$field_types. * @return int|false The number of rows inserted, or false on error. */ public function insert( $table, $data, $format = null ) { @@ -2163,6 +2154,7 @@ class wpdb { /** * Replace a row into a table. * + * Examples: * wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 'bar' ) ) * wpdb::replace( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( '%s', '%d' ) ) * @@ -2171,14 +2163,16 @@ class wpdb { * @see wpdb::$field_types * @see wp_set_wpdb_vars() * - * @param string $table Table name + * @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). - * Sending a null value will cause the column to be set to NULL - the corresponding format is ignored in this case. + * Sending a null value will cause the column to be set to NULL - the corresponding + * format is ignored in this case. * @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. + * If omitted, all values in $data will be treated as strings unless otherwise + * specified in wpdb::$field_types. * @return int|false The number of rows affected, or false on error. */ public function replace( $table, $data, $format = null ) { @@ -2198,11 +2192,13 @@ class wpdb { * @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). - * Sending a null value will cause the column to be set to NULL - the corresponding format is ignored in this case. + * Sending a null value will cause the column to be set to NULL - the corresponding + * format is ignored in this case. * @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. + * 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. * @return int|false The number of rows affected, or false on error. */ @@ -2240,8 +2236,9 @@ class wpdb { } /** - * Update a row in the table + * Update a row in the table. * + * Examples: * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 'bar' ), array( 'ID' => 1 ) ) * wpdb::update( 'table', array( 'column' => 'foo', 'field' => 1337 ), array( 'ID' => 1 ), array( '%s', '%d' ), array( '%d' ) ) * @@ -2258,11 +2255,13 @@ class wpdb { * @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". - * Sending a null value will create an IS NULL comparison - the corresponding format will be ignored in this case. + * Sending a null value will create an IS NULL comparison - the corresponding + * format will be ignored in this case. * @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. + * 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). @@ -2329,11 +2328,13 @@ class wpdb { * @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". - * Sending a null value will create an IS NULL comparison - the corresponding format will be ignored in this case. + * Sending a null value will create an IS NULL comparison - the corresponding + * format will be ignored in this case. * @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. + * If omitted, all values in $data will be treated as strings unless otherwise + * specified in wpdb::$field_types. * @return int|false The number of rows updated, or false on error. */ public function delete( $table, $where, $where_format = null ) { @@ -2369,19 +2370,19 @@ class wpdb { /** * Processes arrays of field/value pairs and field formats. * - * This is a helper method for wpdb's CRUD methods, which take field/value - * pairs for inserts, updates, and where clauses. This method first pairs - * each value with a format. Then it determines the charset of that field, - * using that to determine if any invalid text would be stripped. If text is - * stripped, then field processing is rejected and the query fails. + * This is a helper method for wpdb's CRUD methods, which take field/value pairs for inserts, updates, and where + * clauses. This method first pairs each value with a format. Then it determines the charset of that field, using + * that to determine if any invalid text would be stripped. If text is stripped, then field processing is rejected + * and the query fails. * * @since 4.2.0 * * @param string $table Table name. * @param array $data Field/value pair. * @param mixed $format Format for each field. - * @return array|false Returns an array of fields that contain paired values - * and formats. Returns false for invalid values. + * + * @return array|false Returns an array of fields that contain paired value and formats. Returns false for + * invalid values. */ protected function process_fields( $table, $data, $format ) { $data = $this->process_field_formats( $data, $format ); @@ -2415,8 +2416,7 @@ class wpdb { * * @param array $data Array of fields to values. * @param mixed $format Formats to be mapped to the values in $data. - * @return array Array, keyed by field names with values being an array - * of 'value' and 'format' keys. + * @return array Array, keyed by field names with values being an array of 'value' and 'format' keys. */ protected function process_field_formats( $data, $format ) { $formats = (array) $format; @@ -2444,8 +2444,7 @@ class wpdb { } /** - * Adds field charsets to field/value/format arrays generated by - * the wpdb::process_field_formats() method. + * Adds field charsets to field/value/format arrays generated by the wpdb::process_field_formats() method. * * @since 4.2.0 * @@ -2508,9 +2507,9 @@ class wpdb { /** * Retrieve one variable from the database. * - * Executes a SQL query and returns the value from the SQL result. - * If the SQL result contains more than one column and/or more than one row, this function returns the value in the column and row specified. - * If $query is null, this function returns the value in the specified column and row from the previous SQL result. + * Executes a SQL query and returns the value from the SQL result. If the SQL result contains more than one column + * and/or more than one row, the value in the column and row specified is returned. If $query is null, the value + * in the specified column and row from the previous SQL result is returned. * * @since 0.71 * @@ -2547,8 +2546,9 @@ class wpdb { * @since 0.71 * * @param string|null $query SQL query. - * @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. + * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which + * correspond to a stdClass object, an associative array, or a numeric array, + * respectively. Default OBJECT. * @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 */ @@ -2586,9 +2586,9 @@ class wpdb { /** * Retrieve one column from the database. * - * Executes a SQL query and returns the column from the SQL result. - * If the SQL result contains more than one column, this function returns the column specified. - * If $query is null, this function returns the specified column from the previous SQL result. + * Executes a SQL query and returns the column from the SQL result. If the SQL result contains more than one column, + * this function returns the column specified. If $query is null, this function returns the specified column from + * the previous SQL result. * * @since 0.71 * @@ -2624,11 +2624,13 @@ class wpdb { * * @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 + * 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. + * */ public function get_results( $query = null, $output = OBJECT ) { $this->func_call = "\$db->get_results(\"$query\", $output)"; @@ -2789,8 +2791,8 @@ class wpdb { * * @param string $table Table name. * @param string $column Column name. - * @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. + * @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. */ public function get_col_charset( $table, $column ) { $tablekey = strtolower( $table ); @@ -2847,6 +2849,7 @@ class wpdb { /** * Retrieve the maximum string length allowed in a given column. + * * The length may either be specified as a byte length or a character length. * * @since 4.2.1 @@ -2938,8 +2941,8 @@ class wpdb { /** * Check if a string is ASCII. * - * The negative regex is faster for non-ASCII strings, as it allows - * the search to finish as soon as it encounters a non-ASCII character. + * The negative regex is faster for non-ASCII strings, as it allows the search to finish as soon as it encounters + * a non-ASCII character. * * @since 4.2.0 * @@ -3020,13 +3023,11 @@ class wpdb { * * @since 4.2.0 * - * @param array $data Array of value arrays. Each value array has the keys - * 'value' and 'charset'. An optional 'ascii' key can be - * set to false to avoid redundant ASCII checks. - * @return array|WP_Error The $data parameter, with invalid characters removed from - * each value. This works as a passthrough: any additional keys - * such as 'field' are retained in each value array. If we cannot - * remove invalid characters, a WP_Error object is returned. + * @param array $data Array of value arrays. Each value array has the keys 'value' and 'charset'. An optional + * 'ascii' key can be set to false to avoid redundant ASCII checks. + * @return array|WP_Error The $data parameter, with invalid characters removed from each value. This works as a + * passthrough: any additional keys such as 'field' are retained in each value array. If we + * cannot remove invalid characters, a WP_Error object is returned. */ protected function strip_invalid_text( $data ) { $db_check_string = false; @@ -3039,11 +3040,8 @@ class wpdb { $truncate_by_byte_length = 'byte' === $value['length']['type']; } else { $length = false; - /* - * Since we have no length, we'll never truncate. - * Initialize the variable to false. true would take us - * through an unnecessary (for this case) codepath below. - */ + // Since we have no length, we'll never truncate. Initialize the variable to false. true would take us + // through an unnecessary (for this case) codepath below. $truncate_by_byte_length = false; } @@ -3059,7 +3057,7 @@ class wpdb { $needs_validation = true; if ( - // latin1 can store any byte sequence + // latin1 can store any byte sequence. 'latin1' === $charset || // ASCII is always OK. @@ -3182,7 +3180,7 @@ class wpdb { * * @since 4.2.0 * - * @param string $query Query to convert. + * @param string $query Query to convert. * @return string|WP_Error The converted query, or a WP_Error object if the conversion fails. */ protected function strip_invalid_text_from_query( $query ) { @@ -3302,10 +3300,9 @@ class wpdb { /* * SHOW TABLE STATUS LIKE and SHOW TABLES LIKE 'wp\_123\_%' - * This quoted LIKE operand seldom holds a full table name. - * It is usually a pattern for matching a prefix so we just - * strip the trailing % and unescape the _ to get 'wp_123_' - * which drop-ins can use for routing these SQL statements. + * This quoted LIKE operand seldom holds a full table name. It is usually a + * pattern for matching a prefix so we just strip the trailing % and unescape + * the _ to get 'wp_123_' which drop-ins can use for routing these SQL statements. */ if ( preg_match( '/^\s*SHOW\s+(?:TABLE\s+STATUS|(?:FULL\s+)?TABLES)\s+(?:WHERE\s+Name\s+)?LIKE\s*("|\')((?:[\\\\0-9a-zA-Z$_.-]|[\xC2-\xDF][\x80-\xBF])+)%?\\1/is', $query, $maybe ) ) { return str_replace( '\\_', '_', $maybe[2] ); @@ -3365,8 +3362,10 @@ class wpdb { * * @since 0.71 * - * @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 + * @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 * @return mixed Column Results */ public function get_col_info( $info_type = 'name', $col_offset = -1 ) { @@ -3417,9 +3416,9 @@ class wpdb { * * @since 1.5.0 * - * @param string $message The error message. - * @param string $error_code Optional. A computer-readable string to identify the error. - * @return void|false Void if the showing of errors is enabled, false if disabled. + * @param string $message The Error message + * @param string $error_code Optional. A Computer readable string to identify the error. + * @return false|void */ public function bail( $message, $error_code = '500' ) { if ( $this->show_errors ) { @@ -3461,8 +3460,7 @@ class wpdb { * * @since 4.5.0 * - * @return bool True if the connection was successfully closed, false if it wasn't, - * or the connection doesn't exist. + * @return bool True if the connection was successfully closed, false if it wasn't, or if the connection doesn't exist. */ public function close() { if ( ! $this->dbh ) { @@ -3489,10 +3487,9 @@ class wpdb { * * @since 2.5.0 * - * @global string $wp_version The WordPress version string. - * @global string $required_mysql_version The required MySQL version string. - * - * @return void|WP_Error + * @global string $wp_version + * @global string $required_mysql_version + * @return WP_Error|void */ public function check_database_version() { global $wp_version, $required_mysql_version; @@ -3549,8 +3546,7 @@ class wpdb { * * @see wpdb::db_version() * - * @param string $db_cap The feature to check for. Accepts 'collation', - * 'group_concat', 'subqueries', 'set_charset', + * @param string $db_cap The feature to check for. Accepts 'collation', 'group_concat', 'subqueries', 'set_charset', * 'utf8mb4', or 'utf8mb4_520'. * @return int|false Whether the database feature is supported, false otherwise. */ @@ -3594,8 +3590,7 @@ class wpdb { /** * Retrieve the name of the function that called wpdb. * - * Searches up the list of functions until it reaches - * the one that would most logically had called this method. + * Searches up the list of functions until it reaches the one that would most logically had called this method. * * @since 2.5.0 *