Make WordPress Core


Ignore:
Timestamp:
02/21/2023 04:37:03 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Docs: Document default values for optional parameters in various DocBlocks.

Props paulkevan, costdev, audrasjb, SergeyBiryukov.
See #56792.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wpdb.php

    r55158 r55398  
    10731073         *
    10741074         * @param int $blog_id
    1075          * @param int $network_id Optional.
     1075         * @param int $network_id Optional. Network ID. Default 0.
    10761076         * @return int Previous blog ID.
    10771077         */
     
    11021102         * @since 3.0.0
    11031103         *
    1104          * @param int $blog_id Optional.
     1104         * @param int $blog_id Optional. Blog ID to retrieve the table prefix for.
     1105         *                     Defaults to the current blog ID.
    11051106         * @return string Blog prefix.
    11061107         */
     
    12211222         *
    12221223         * @param string          $db  Database name.
    1223          * @param mysqli|resource $dbh Optional database connection.
     1224         * @param mysqli|resource $dbh Optional. Database connection.
     1225         *                             Defaults to the current database handle.
    12241226         */
    12251227        public function select( $db, $dbh = null ) {
     
    25622564         *                             A format is one of '%d', '%f', '%s' (integer, float, string).
    25632565         *                             If omitted, all values in $data will be treated as strings unless otherwise
    2564          *                             specified in wpdb::$field_types.
     2566         *                             specified in wpdb::$field_types. Default null.
    25652567         * @return int|false The number of rows inserted, or false on error.
    25662568         */
     
    25922594         *                             A format is one of '%d', '%f', '%s' (integer, float, string).
    25932595         *                             If omitted, all values in $data will be treated as strings unless otherwise
    2594          *                             specified in wpdb::$field_types.
     2596         *                             specified in wpdb::$field_types. Default null.
    25952597         * @return int|false The number of rows affected, or false on error.
    25962598         */
     
    26192621         *                             A format is one of '%d', '%f', '%s' (integer, float, string).
    26202622         *                             If omitted, all values in $data will be treated as strings unless otherwise
    2621          *                             specified in wpdb::$field_types.
     2623         *                             specified in wpdb::$field_types. Default null.
    26222624         * @param string       $type   Optional. Type of operation. Possible values include 'INSERT' or 'REPLACE'.
    26232625         *                             Default 'INSERT'.
     
    26852687         *                                   A format is one of '%d', '%f', '%s' (integer, float, string).
    26862688         *                                   If omitted, all values in $data will be treated as strings unless otherwise
    2687          *                                   specified in wpdb::$field_types.
     2689         *                                   specified in wpdb::$field_types. Default null.
    26882690         * @param array|string $where_format Optional. An array of formats to be mapped to each of the values in $where.
    26892691         *                                   If string, that format will be used for all of the items in $where.
    26902692         *                                   A format is one of '%d', '%f', '%s' (integer, float, string).
    2691          *                                   If omitted, all values in $where will be treated as strings.
     2693         *                                   If omitted, all values in $where will be treated as strings. Default null.
    26922694         * @return int|false The number of rows updated, or false on error.
    26932695         */
     
    27612763         *                                   A format is one of '%d', '%f', '%s' (integer, float, string).
    27622764         *                                   If omitted, all values in $data will be treated as strings unless otherwise
    2763          *                                   specified in wpdb::$field_types.
     2765         *                                   specified in wpdb::$field_types. Default null.
    27642766         * @return int|false The number of rows deleted, or false on error.
    27652767         */
     
    29682970         *
    29692971         * @param string|null $query Optional. SQL query. Defaults to null, use the result from the previous query.
    2970          * @param int         $x     Optional. Column of value to return. Indexed from 0.
    2971          * @param int         $y     Optional. Row of value to return. Indexed from 0.
     2972         * @param int         $x     Optional. Column of value to return. Indexed from 0. Default 0.
     2973         * @param int         $y     Optional. Row of value to return. Indexed from 0. Default 0.
    29722974         * @return string|null Database query result (as string), or null on failure.
    29732975         */
     
    30033005         *                            correspond to an stdClass object, an associative array, or a numeric array,
    30043006         *                            respectively. Default OBJECT.
    3005          * @param int         $y      Optional. Row to return. Indexed from 0.
     3007         * @param int         $y      Optional. Row to return. Indexed from 0. Default 0.
    30063008         * @return array|object|null|void Database query result in format specified by $output or null on failure.
    30073009         */
     
    30473049         *
    30483050         * @param string|null $query Optional. SQL query. Defaults to previous query.
    3049          * @param int         $x     Optional. Column to return. Indexed from 0.
     3051         * @param int         $x     Optional. Column to return. Indexed from 0. Default 0.
    30503052         * @return array Database query result. Array indexed from 0 by SQL result row number.
    30513053         */
     
    30843086         *                       return an associative array of row objects keyed by the value
    30853087         *                       of each row's first column's value. Duplicate keys are discarded.
     3088         *                       Default OBJECT.
    30863089         * @return array|object|null Database query results.
    30873090         */
Note: See TracChangeset for help on using the changeset viewer.