Make WordPress Core

Changeset 57110


Ignore:
Timestamp:
11/14/2023 12:42:52 PM (6 months ago)
Author:
SergeyBiryukov
Message:

Docs: Use typed array notation for the $options parameter in some new functions.

Follow-up to [56445], [56508], [57013].

Props tmatsuur.
Fixes #59904.

File:
1 edited

Legend:

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

    r57053 r57110  
    257257 * @global wpdb $wpdb WordPress database abstraction object.
    258258 *
    259  * @param array $options An array of option names to be loaded.
     259 * @param string[] $options An array of option names to be loaded.
    260260 */
    261261function wp_prime_option_caches( $options ) {
     262    global $wpdb;
     263
    262264    $alloptions     = wp_load_alloptions();
    263265    $cached_options = wp_cache_get_multiple( $options, 'options' );
     
    284286    }
    285287
    286     global $wpdb;
    287288    $results = $wpdb->get_results(
    288289        $wpdb->prepare(
     
    352353 * @since 6.4.0
    353354 *
    354  * @param array $options An array of option names to retrieve.
     355 * @param string[] $options An array of option names to retrieve.
    355356 * @return array An array of key-value pairs for the requested options.
    356357 */
     
    499500 * @see wp_set_option_autoload_values()
    500501 *
    501  * @param array       $options  List of option names. Expected to not be SQL-escaped.
     502 * @param string[]    $options  List of option names. Expected to not be SQL-escaped.
    502503 * @param string|bool $autoload Autoload value to control whether to load the options when WordPress starts up.
    503504 *                              Accepts 'yes'|true to enable or 'no'|false to disable.
Note: See TracChangeset for help on using the changeset viewer.