Changeset 46780 for branches/5.3
- Timestamp:
- 11/25/2019 01:44:16 PM (5 years ago)
- Location:
- branches/5.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.3
- Property svn:mergeinfo changed
/trunk merged: 46753,46779
- Property svn:mergeinfo changed
-
branches/5.3/src/wp-includes/option.php
r46121 r46780 190 190 * 191 191 * @since 2.2.0 192 * @since 5.3.1 The `$force_cache` parameter was added. 192 193 * 193 194 * @global wpdb $wpdb WordPress database abstraction object. 194 195 * 196 * @param bool $force_cache Optional. Whether to force an update of the local cache 197 * from the persistent cache. Default false. 195 198 * @return array List of all options. 196 199 */ 197 function wp_load_alloptions( ) {200 function wp_load_alloptions( $force_cache = false ) { 198 201 global $wpdb; 199 202 200 203 if ( ! wp_installing() || ! is_multisite() ) { 201 $alloptions = wp_cache_get( 'alloptions', 'options' );204 $alloptions = wp_cache_get( 'alloptions', 'options', $force_cache ); 202 205 } else { 203 206 $alloptions = false; … … 398 401 399 402 if ( ! wp_installing() ) { 400 $alloptions = wp_load_alloptions( );403 $alloptions = wp_load_alloptions( true ); 401 404 if ( isset( $alloptions[ $option ] ) ) { 402 405 $alloptions[ $option ] = $serialized_value; … … 506 509 if ( ! wp_installing() ) { 507 510 if ( 'yes' == $autoload ) { 508 $alloptions = wp_load_alloptions( );511 $alloptions = wp_load_alloptions( true ); 509 512 $alloptions[ $option ] = $serialized_value; 510 513 wp_cache_set( 'alloptions', $alloptions, 'options' ); … … 584 587 if ( ! wp_installing() ) { 585 588 if ( 'yes' == $row->autoload ) { 586 $alloptions = wp_load_alloptions( );589 $alloptions = wp_load_alloptions( true ); 587 590 if ( is_array( $alloptions ) && isset( $alloptions[ $option ] ) ) { 588 591 unset( $alloptions[ $option ] );
Note: See TracChangeset
for help on using the changeset viewer.