@@ -256,9 +256,11 @@ function get_option( $option, $default_value = false ) {
256256 *
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 ' );
264266 $ notoptions = wp_cache_get ( 'notoptions ' , 'options ' );
@@ -283,7 +285,6 @@ function wp_prime_option_caches( $options ) {
283285 return ;
284286 }
285287
286- global $ wpdb ;
287288 $ results = $ wpdb ->get_results (
288289 $ wpdb ->prepare (
289290 sprintf (
@@ -351,7 +352,7 @@ function wp_prime_option_caches_by_group( $option_group ) {
351352 *
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 */
357358function get_options ( $ options ) {
@@ -498,7 +499,7 @@ function wp_set_option_autoload_values( array $options ) {
498499 *
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.
504505 * @return array Associative array of all provided $options as keys and boolean values for whether their autoload value
0 commit comments