Changeset 56796
- Timestamp:
- 10/06/2023 04:31:22 PM (10 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r56788 r56796 860 860 861 861 if ( ! wp_installing() ) { 862 $alloptions = wp_load_alloptions( true ); 863 if ( isset( $alloptions[ $option ] ) ) { 862 if ( ! isset( $update_args['autoload'] ) ) { 863 // Update the cached value based on where it is currently cached. 864 $alloptions = wp_load_alloptions( true ); 865 if ( isset( $alloptions[ $option ] ) ) { 866 $alloptions[ $option ] = $serialized_value; 867 wp_cache_set( 'alloptions', $alloptions, 'options' ); 868 } else { 869 wp_cache_set( $option, $serialized_value, 'options' ); 870 } 871 } elseif ( 'yes' === $update_args['autoload'] ) { 872 // Delete the individual cache, then set in alloptions cache. 873 wp_cache_delete( $option, 'options' ); 874 875 $alloptions = wp_load_alloptions( true ); 864 876 $alloptions[ $option ] = $serialized_value; 865 877 wp_cache_set( 'alloptions', $alloptions, 'options' ); 866 878 } else { 879 880 881 882 883 884 885 867 886 wp_cache_set( $option, $serialized_value, 'options' ); 868 887 } -
trunk/tests/phpunit/tests/option/option.php
r56788 r56796 778 778 $this->assertSame( 10, has_filter( 'pre_option_foo', '__return_zero' ) ); 779 779 } 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 780 812 }
Note: See TracChangeset
for help on using the changeset viewer.