Changeset 56990
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r56946 r56990 249 249 250 250 /** 251 * Primes specific options into the cache with a single database query.252 * 253 * Only options that do not already exist in cache will be primed.251 * Loads specific options into the cache with a single database query. 252 * 253 * Only options that do not already exist in cache will be loaded. 254 254 * 255 255 * @since 6.4.0 … … 257 257 * @global wpdb $wpdb WordPress database abstraction object. 258 258 * 259 * @param array $options An array of option names to be primed.260 */ 261 function prime_options( $options ) {259 * @param array $options An array of option names to be loaded. 260 */ 261 function wp_load_options( $options ) { 262 262 $alloptions = wp_load_alloptions(); 263 263 $cached_options = wp_cache_get_multiple( $options, 'options' ); … … 271 271 } 272 272 273 // Bail early if there are no options to be primed.273 // Bail early if there are no options to be loaded. 274 274 if ( empty( $options_to_prime ) ) { 275 275 return; … … 322 322 323 323 /** 324 * Primes all options registered with a specific option group.324 * Loads all options registered with a specific option group. 325 325 * 326 326 * @since 6.4.0 … … 328 328 * @global array $new_allowed_options 329 329 * 330 * @param string $option_group The option group to primeoptions for.331 */ 332 function prime_options_by_group( $option_group ) {330 * @param string $option_group The option group to load options for. 331 */ 332 function wp_load_options_by_group( $option_group ) { 333 333 global $new_allowed_options; 334 334 335 335 if ( isset( $new_allowed_options[ $option_group ] ) ) { 336 prime_options( $new_allowed_options[ $option_group ] );336 wp_load_options( $new_allowed_options[ $option_group ] ); 337 337 } 338 338 } … … 341 341 * Retrieves multiple options. 342 342 * 343 * Options are primed as necessary first in order to use a single database query at most.343 * Options are loaded as necessary first in order to use a single database query at most. 344 344 * 345 345 * @since 6.4.0 … … 349 349 */ 350 350 function get_options( $options ) { 351 prime_options( $options );351 wp_load_options( $options ); 352 352 353 353 $result = array();
Note: See TracChangeset
for help on using the changeset viewer.