Ticket #25344: 25344.6.patch
File 25344.6.patch, 22.8 KB (added by , 4 years ago) |
---|
-
src/wp-admin/includes/class-wp-plugins-list-table.php
diff --git src/wp-admin/includes/class-wp-plugins-list-table.php src/wp-admin/includes/class-wp-plugins-list-table.php index 136fbd4..769756e 100644
157 157 158 158 set_transient( 'plugin_slugs', array_keys( $plugins['all'] ), DAY_IN_SECONDS ); 159 159 160 // Look for recently activated plugins 160 161 if ( $screen->in_admin( 'network' ) ) { 161 162 $recently_activated = get_site_option( 'recently_activated', array() ); 162 163 } else { 163 164 $recently_activated = get_option( 'recently_activated', array() ); 164 165 } 165 166 166 foreach ( $recently_activated as $key => $time ) { 167 if ( $time + WEEK_IN_SECONDS < time() ) { 168 unset( $recently_activated[$key] ); 169 } 170 } 167 // Plugins were recently activated 168 if ( ! empty( $recently_activated ) ) { 171 169 172 if ( $screen->in_admin( 'network' ) ) { 173 update_site_option( 'recently_activated', $recently_activated ); 174 } else { 175 update_option( 'recently_activated', $recently_activated ); 170 // Try to expire plugins activated over 1 week ago 171 foreach ( $recently_activated as $key => $time ) { 172 if ( $time + WEEK_IN_SECONDS < time() ) { 173 unset( $recently_activated[$key] ); 174 } 175 } 176 177 // Some plugins were activated less than 1 week ago, so save them 178 if ( ! empty( $recently_activated ) ) { 179 if ( $screen->in_admin( 'network' ) ) { 180 update_site_option( 'recently_activated', $recently_activated ); 181 } else { 182 update_option( 'recently_activated', $recently_activated ); 183 } 184 185 // No plugins were activated less than 1 week ago, so delete the option 186 } else { 187 if ( $screen->in_admin( 'network' ) ) { 188 delete_site_option( 'recently_activated', $recently_activated ); 189 } else { 190 delete_option( 'recently_activated', $recently_activated ); 191 } 192 } 176 193 } 177 194 178 195 $plugin_info = get_site_transient( 'update_plugins' ); -
src/wp-includes/class-wp-network-query.php
diff --git src/wp-includes/class-wp-network-query.php src/wp-includes/class-wp-network-query.php index 1bf38ad..e5e42fa 100644
119 119 * @type array $path__not_in Array of paths to exclude affiliated networks for. Default empty. 120 120 * @type string $search Search term(s) to retrieve matching networks for. Default empty. 121 121 * @type bool $update_network_cache Whether to prime the cache for found networks. Default true. 122 * @type bool $update_network_meta_cache Whether to update the network meta cache. Default true. 122 123 * } 123 124 */ 124 125 public function __construct( $query = '' ) { … … 140 141 'path__not_in' => '', 141 142 'search' => '', 142 143 'update_network_cache' => true, 144 'update_network_meta_cache' => true, 143 145 ); 144 146 145 147 if ( ! empty( $query ) ) { … … 248 250 } 249 251 250 252 if ( $this->query_vars['update_network_cache'] ) { 251 _prime_network_caches( $network_ids );253 _prime_network_caches( $network_ids, $this->query_vars['update_network_meta_cache'] ); 252 254 } 253 255 254 256 // Fetch full network objects from the primed cache. -
src/wp-includes/functions.php
diff --git src/wp-includes/functions.php src/wp-includes/functions.php index ee214e9..0fe64ca 100644
4440 4440 // If the current network has an ID of 1, assume it is the main network. 4441 4441 $main_network_id = 1; 4442 4442 } else { 4443 $_networks = get_networks( array( 'fields' => 'ids', 'number' => 1 ) ); 4443 $_networks = get_networks( array( 4444 'fields' => 'ids', 4445 'number' => 1, 4446 'update_network_meta_cache' => false 4447 ) ); 4444 4448 $main_network_id = array_shift( $_networks ); 4445 4449 } 4446 4450 -
src/wp-includes/ms-blogs.php
diff --git src/wp-includes/ms-blogs.php src/wp-includes/ms-blogs.php index 01bb986..ee32e98 100644
842 842 if ( is_array( $global_groups ) ) { 843 843 wp_cache_add_global_groups( $global_groups ); 844 844 } else { 845 wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details' ) );845 wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details', 'site_meta' ) ); 846 846 } 847 847 wp_cache_add_non_persistent_groups( array( 'counts', 'plugins' ) ); 848 848 } … … 916 916 if ( is_array( $global_groups ) ) { 917 917 wp_cache_add_global_groups( $global_groups ); 918 918 } else { 919 wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details' ) );919 wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details', 'site_meta' ) ); 920 920 } 921 921 wp_cache_add_non_persistent_groups( array( 'counts', 'plugins' ) ); 922 922 } … … 1192 1192 * cache using the network group with the key using the ID of the networks. 1193 1193 * 1194 1194 * @since 4.6.0 1195 * @since 4.8.0 Introduced the `$update_meta_cache` parameter. 1195 1196 * 1196 * @param array $networks Array of network row objects. 1197 * @param array $networks Array of network row objects. 1198 * @param bool $update_meta_cache Optional. Whether to update the meta cache. Default true. 1197 1199 */ 1198 function update_network_cache( $networks ) {1200 function update_network_cache( $networks, $update_meta_cache = true ) { 1199 1201 foreach ( (array) $networks as $network ) { 1200 1202 wp_cache_add( $network->id, $network, 'networks' ); 1203 } 1204 1205 if ( $update_meta_cache ) { 1206 update_networkmeta_cache( wp_list_pluck( $networks, 'id' ) ); 1201 1207 } 1202 1208 } 1203 1209 … … 1205 1211 * Adds any networks from the given IDs to the cache that do not already exist in cache. 1206 1212 * 1207 1213 * @since 4.6.0 1214 * @since 4.8.0 Introduced the `$update_meta_cache` parameter. 1208 1215 * @access private 1209 1216 * 1210 1217 * @see update_network_cache() 1211 1218 * @global wpdb $wpdb WordPress database abstraction object. 1212 1219 * 1213 * @param array $network_ids Array of network IDs. 1220 * @param array $network_ids Array of network IDs. 1221 * @param bool $update_meta_cache Optional. Whether to update the meta cache. Default true. 1214 1222 */ 1215 function _prime_network_caches( $network_ids ) {1223 function _prime_network_caches( $network_ids, $update_meta_cache = true ) { 1216 1224 global $wpdb; 1217 1225 1218 1226 $non_cached_ids = _get_non_cached_ids( $network_ids, 'networks' ); 1219 if ( ! empty( $non_cached_ids ) ) {1220 $fresh_networks = $wpdb->get_results( sprintf( "SELECT $wpdb->site.* FROM $wpdb->siteWHERE id IN (%s)", join( ",", array_map( 'intval', $non_cached_ids ) ) ) );1227 if ( ! empty( $non_cached_ids ) ) { 1228 $fresh_networks = $wpdb->get_results( sprintf( "SELECT * FROM {$wpdb->site} WHERE id IN (%s)", join( ",", array_map( 'intval', $non_cached_ids ) ) ) ); 1221 1229 1222 update_network_cache( $fresh_networks );1230 update_network_cache( $fresh_networks, $update_meta_cache ); 1223 1231 } 1224 1232 } 1225 1233 -
src/wp-includes/ms-functions.php
diff --git src/wp-includes/ms-functions.php src/wp-includes/ms-functions.php index a562cdf..8cceacd 100644
2513 2513 */ 2514 2514 return apply_filters( 'subdirectory_reserved_names', $names ); 2515 2515 } 2516 2517 /** 2518 * Add metadata to a network. 2519 * 2520 * @since 4.8.0 2521 * 2522 * @param int $id Network ID. 2523 * @param string $meta_key Metadata name. 2524 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar. 2525 * @param bool $unique Optional. Whether the same key should not be added. 2526 * Default false. 2527 * @return int|false Meta ID on success, false on failure. 2528 */ 2529 function add_network_meta( $id, $meta_key, $meta_value, $unique = false ) { 2530 return add_metadata( 'site', $id, $meta_key, $meta_value, $unique ); 2531 } 2532 2533 /** 2534 * Remove from a network, metadata matching key and/or value. 2535 * 2536 * You can match based on the key, or key and value. Removing based on key and 2537 * value, will keep from removing duplicate metadata with the same key. It also 2538 * allows removing all metadata matching key, if needed. 2539 * 2540 * @since 4.8.0 2541 * 2542 * @param int $id Network ID. 2543 * @param string $meta_key Metadata name. 2544 * @param mixed $meta_value Optional. Metadata value. Must be serializable if 2545 * non-scalar. Default empty. 2546 * @return bool True on success, false on failure. 2547 */ 2548 function delete_network_meta( $id, $meta_key, $meta_value = '' ) { 2549 return delete_metadata( 'site', $id, $meta_key, $meta_value ); 2550 } 2551 2552 /** 2553 * Retrieve from a network, metadata value by key. 2554 * 2555 * @since 4.8.0 2556 * 2557 * @param int $id Network ID. 2558 * @param string $meta_key Optional. The meta key to retrieve. By default, returns 2559 * data for all keys. Default empty. 2560 * @param bool $single Optional. Whether to return a single value. Default false. 2561 * @return mixed Will be an array if $single is false. Will be value of meta data 2562 * field if $single is true. 2563 */ 2564 function get_network_meta( $id, $meta_key = '', $single = false ) { 2565 return get_metadata( 'site', $id, $meta_key, $single ); 2566 } 2567 2568 /** 2569 * Update metadata for a network ID, and/or key, and/or value. 2570 * 2571 * Use the $prev_value parameter to differentiate between meta fields with the 2572 * same key and network ID. 2573 * 2574 * If the meta field for the network does not exist, it will be added. 2575 * 2576 * @since 4.8.0 2577 * 2578 * @param int $id Network ID. 2579 * @param string $meta_key Metadata key. 2580 * @param mixed $meta_value Metadata value. Must be serializable if non-scalar. 2581 * @param mixed $prev_value Optional. Previous value to check before removing. 2582 * Default empty. 2583 * @return int|bool Meta ID if the key didn't exist, true on successful update, 2584 * false on failure. 2585 */ 2586 function update_network_meta( $id, $meta_key, $meta_value, $prev_value = '' ) { 2587 return update_metadata( 'site', $id, $meta_key, $meta_value, $prev_value ); 2588 } 2589 2590 /** 2591 * Updates metadata cache for list of network IDs. 2592 * 2593 * Performs SQL query to retrieve the metadata for the network IDs and updates the 2594 * metadata cache for the posts. Therefore, the functions, which call this 2595 * function, do not need to perform SQL queries on their own. 2596 * 2597 * @since 4.8.0 2598 * 2599 * @param array $network_ids List of network IDs. 2600 * @return array|false Returns false if there is nothing to update or an array 2601 * of metadata. 2602 */ 2603 function update_networkmeta_cache( $network_ids) { 2604 return update_meta_cache( 'site', $network_ids ); 2605 } -
src/wp-includes/option.php
diff --git src/wp-includes/option.php src/wp-includes/option.php index d58ae69..ac0fb00 100644
207 207 * 208 208 * @global wpdb $wpdb WordPress database abstraction object. 209 209 * 210 * @param int $ site_id Optional siteID for which to query the options. Defaults to the current site.210 * @param int $network_id Optional network ID for which to query the options. Defaults to the current site. 211 211 */ 212 function wp_load_core_site_options( $ site_id = null ) {212 function wp_load_core_site_options( $network_id = null ) { 213 213 global $wpdb; 214 214 215 215 if ( ! is_multisite() || wp_using_ext_object_cache() || wp_installing() ) 216 216 return; 217 217 218 if ( empty($site_id) ) 219 $site_id = $wpdb->siteid; 220 221 $core_options = array('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled', 'ms_files_rewriting' ); 222 223 $core_options_in = "'" . implode("', '", $core_options) . "'"; 224 $options = $wpdb->get_results( $wpdb->prepare("SELECT meta_key, meta_value FROM $wpdb->sitemeta WHERE meta_key IN ($core_options_in) AND site_id = %d", $site_id) ); 225 226 foreach ( $options as $option ) { 227 $key = $option->meta_key; 228 $cache_key = "{$site_id}:$key"; 229 $option->meta_value = maybe_unserialize( $option->meta_value ); 230 231 wp_cache_set( $cache_key, $option->meta_value, 'site-options' ); 218 if ( empty( $network_id ) ) { 219 $network_id = $wpdb->siteid; 232 220 } 221 222 update_networkmeta_cache( $network_id ); 233 223 } 234 224 235 225 /** … … 1091 1081 * @return mixed Value set for the option. 1092 1082 */ 1093 1083 function get_network_option( $network_id, $option, $default = false ) { 1094 global $wpdb;1095 1084 1096 1085 if ( $network_id && ! is_numeric( $network_id ) ) { 1097 1086 return false; … … 1127 1116 return $pre; 1128 1117 } 1129 1118 1130 // prevent non-existent options from triggering multiple queries 1131 $notoptions_key = "$network_id:notoptions"; 1132 $notoptions = wp_cache_get( $notoptions_key, 'site-options' ); 1133 1134 if ( isset( $notoptions[ $option ] ) ) { 1135 1136 /** 1137 * Filters a specific default network option. 1138 * 1139 * The dynamic portion of the hook name, `$option`, refers to the option name. 1140 * 1141 * @since 3.4.0 1142 * @since 4.4.0 The `$option` parameter was added. 1143 * @since 4.7.0 The `$network_id` parameter was added. 1144 * 1145 * @param mixed $default The value to return if the site option does not exist 1146 * in the database. 1147 * @param string $option Option name. 1148 * @param int $network_id ID of the network. 1149 */ 1150 return apply_filters( "default_site_option_{$option}", $default, $option, $network_id ); 1151 } 1119 /** 1120 * Filters a specific default network option. 1121 * 1122 * The dynamic portion of the hook name, `$option`, refers to the option name. 1123 * 1124 * @since 3.4.0 1125 * @since 4.4.0 The `$option` parameter was added. 1126 * @since 4.7.0 The `$network_id` parameter was added. 1127 * 1128 * @param mixed $default The value to return if the site option does not exist 1129 * in the database. 1130 * @param string $option Option name. 1131 * @param int $network_id ID of the network. 1132 */ 1133 $default = apply_filters( 'default_site_option_' . $option, $default, $option, $network_id ); 1152 1134 1153 1135 if ( ! is_multisite() ) { 1154 /** This filter is documented in wp-includes/option.php */1155 $default = apply_filters( 'default_site_option_' . $option, $default, $option, $network_id );1156 1136 $value = get_option( $option, $default ); 1157 1137 } else { 1158 $cache_key = "$network_id:$option"; 1159 $value = wp_cache_get( $cache_key, 'site-options' ); 1160 1161 if ( ! isset( $value ) || false === $value ) { 1162 $row = $wpdb->get_row( $wpdb->prepare( "SELECT meta_value FROM $wpdb->sitemeta WHERE meta_key = %s AND site_id = %d", $option, $network_id ) ); 1163 1164 // Has to be get_row instead of get_var because of funkiness with 0, false, null values 1165 if ( is_object( $row ) ) { 1166 $value = $row->meta_value; 1167 $value = maybe_unserialize( $value ); 1168 wp_cache_set( $cache_key, $value, 'site-options' ); 1169 } else { 1170 if ( ! is_array( $notoptions ) ) { 1171 $notoptions = array(); 1172 } 1173 $notoptions[ $option ] = true; 1174 wp_cache_set( $notoptions_key, $notoptions, 'site-options' ); 1175 1176 /** This filter is documented in wp-includes/option.php */ 1177 $value = apply_filters( 'default_site_option_' . $option, $default, $option, $network_id ); 1178 } 1138 $value = get_network_meta( $network_id, $option, true ); 1139 if ( empty( $value ) ) { 1140 $value = $default; 1179 1141 } 1180 1142 } 1181 1143 … … 1213 1175 * @return bool False if option was not added and true if option was added. 1214 1176 */ 1215 1177 function add_network_option( $network_id, $option, $value ) { 1216 global $wpdb;1217 1178 1218 1179 if ( $network_id && ! is_numeric( $network_id ) ) { 1219 1180 return false; … … 1244 1205 */ 1245 1206 $value = apply_filters( "pre_add_site_option_{$option}", $value, $option, $network_id ); 1246 1207 1247 $notoptions_key = "$network_id:notoptions";1248 1249 1208 if ( ! is_multisite() ) { 1250 1209 $result = add_option( $option, $value, '', 'no' ); 1251 1210 } else { 1252 $cache_key = "$network_id:$option"; 1253 1254 // Make sure the option doesn't already exist. We can check the 'notoptions' cache before we ask for a db query 1255 $notoptions = wp_cache_get( $notoptions_key, 'site-options' ); 1256 if ( ! is_array( $notoptions ) || ! isset( $notoptions[ $option ] ) ) { 1257 if ( false !== get_network_option( $network_id, $option, false ) ) { 1258 return false; 1259 } 1260 } 1261 1262 $value = sanitize_option( $option, $value ); 1263 1264 $serialized_value = maybe_serialize( $value ); 1265 $result = $wpdb->insert( $wpdb->sitemeta, array( 'site_id' => $network_id, 'meta_key' => $option, 'meta_value' => $serialized_value ) ); 1266 1267 if ( ! $result ) { 1268 return false; 1269 } 1270 1271 wp_cache_set( $cache_key, $value, 'site-options' ); 1272 1273 // This option exists now 1274 $notoptions = wp_cache_get( $notoptions_key, 'site-options' ); // yes, again... we need it to be fresh 1275 if ( is_array( $notoptions ) && isset( $notoptions[ $option ] ) ) { 1276 unset( $notoptions[ $option ] ); 1277 wp_cache_set( $notoptions_key, $notoptions, 'site-options' ); 1278 } 1211 $value = sanitize_option( $option, $value ); 1212 $result = add_network_meta( $network_id, $option, $value ); 1279 1213 } 1280 1214 1281 1215 if ( $result ) { … … 1327 1261 * @return bool True, if succeed. False, if failure. 1328 1262 */ 1329 1263 function delete_network_option( $network_id, $option ) { 1330 global $wpdb;1331 1264 1332 1265 if ( $network_id && ! is_numeric( $network_id ) ) { 1333 1266 return false; … … 1357 1290 if ( ! is_multisite() ) { 1358 1291 $result = delete_option( $option ); 1359 1292 } else { 1360 $row = $wpdb->get_row( $wpdb->prepare( "SELECT meta_id FROM {$wpdb->sitemeta} WHERE meta_key = %s AND site_id = %d", $option, $network_id ) ); 1361 if ( is_null( $row ) || ! $row->meta_id ) { 1362 return false; 1363 } 1364 $cache_key = "$network_id:$option"; 1365 wp_cache_delete( $cache_key, 'site-options' ); 1366 1367 $result = $wpdb->delete( $wpdb->sitemeta, array( 'meta_key' => $option, 'site_id' => $network_id ) ); 1293 $result = delete_network_meta( $network_id, $option ); 1368 1294 } 1369 1295 1370 1296 if ( $result ) { … … 1415 1341 * @return bool False if value was not updated and true if value was updated. 1416 1342 */ 1417 1343 function update_network_option( $network_id, $option, $value ) { 1418 global $wpdb;1419 1344 1420 1345 if ( $network_id && ! is_numeric( $network_id ) ) { 1421 1346 return false; … … 1457 1382 return add_network_option( $network_id, $option, $value ); 1458 1383 } 1459 1384 1460 $notoptions_key = "$network_id:notoptions";1461 $notoptions = wp_cache_get( $notoptions_key, 'site-options' );1462 if ( is_array( $notoptions ) && isset( $notoptions[ $option ] ) ) {1463 unset( $notoptions[ $option ] );1464 wp_cache_set( $notoptions_key, $notoptions, 'site-options' );1465 }1466 1467 1385 if ( ! is_multisite() ) { 1468 1386 $result = update_option( $option, $value, 'no' ); 1469 1387 } else { 1470 $value = sanitize_option( $option, $value ); 1471 1472 $serialized_value = maybe_serialize( $value ); 1473 $result = $wpdb->update( $wpdb->sitemeta, array( 'meta_value' => $serialized_value ), array( 'site_id' => $network_id, 'meta_key' => $option ) ); 1474 1475 if ( $result ) { 1476 $cache_key = "$network_id:$option"; 1477 wp_cache_set( $cache_key, $value, 'site-options' ); 1478 } 1388 $value = sanitize_option( $option, $value ); 1389 $result = update_network_meta( $network_id, $option, $value ); 1479 1390 } 1480 1391 1481 1392 if ( $result ) { -
src/wp-settings.php
diff --git src/wp-settings.php src/wp-settings.php index d1505c5..f26162e 100644
94 94 95 95 // Load early WordPress files. 96 96 require( ABSPATH . WPINC . '/compat.php' ); 97 require( ABSPATH . WPINC . '/class-wp-list-util.php' );98 97 require( ABSPATH . WPINC . '/functions.php' ); 98 require( ABSPATH . WPINC . '/formatting.php' ); 99 require( ABSPATH . WPINC . '/meta.php' ); 100 require( ABSPATH . WPINC . '/class-wp-list-util.php' ); 99 101 require( ABSPATH . WPINC . '/class-wp-matchesmapregex.php' ); 100 102 require( ABSPATH . WPINC . '/class-wp.php' ); 101 103 require( ABSPATH . WPINC . '/class-wp-error.php' ); … … 119 121 if ( is_multisite() ) { 120 122 require( ABSPATH . WPINC . '/class-wp-site-query.php' ); 121 123 require( ABSPATH . WPINC . '/class-wp-network-query.php' ); 124 require( ABSPATH . WPINC . '/ms-functions.php' ); 122 125 require( ABSPATH . WPINC . '/ms-blogs.php' ); 123 126 require( ABSPATH . WPINC . '/ms-settings.php' ); 124 127 } elseif ( ! defined( 'MULTISITE' ) ) { … … 142 145 // Load most of WordPress. 143 146 require( ABSPATH . WPINC . '/class-wp-walker.php' ); 144 147 require( ABSPATH . WPINC . '/class-wp-ajax-response.php' ); 145 require( ABSPATH . WPINC . '/formatting.php' );146 148 require( ABSPATH . WPINC . '/capabilities.php' ); 147 149 require( ABSPATH . WPINC . '/class-wp-roles.php' ); 148 150 require( ABSPATH . WPINC . '/class-wp-role.php' ); … … 157 159 require( ABSPATH . WPINC . '/class-wp-user-query.php' ); 158 160 require( ABSPATH . WPINC . '/class-wp-session-tokens.php' ); 159 161 require( ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php' ); 160 require( ABSPATH . WPINC . '/meta.php' );161 162 require( ABSPATH . WPINC . '/class-wp-meta-query.php' ); 162 163 require( ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php' ); 163 164 require( ABSPATH . WPINC . '/general-template.php' ); … … 244 245 245 246 // Load multisite-specific files. 246 247 if ( is_multisite() ) { 247 require( ABSPATH . WPINC . '/ms-functions.php' );248 248 require( ABSPATH . WPINC . '/ms-default-filters.php' ); 249 249 require( ABSPATH . WPINC . '/ms-deprecated.php' ); 250 250 } -
tests/phpunit/includes/testcase.php
diff --git tests/phpunit/includes/testcase.php tests/phpunit/includes/testcase.php index c77511d..37e75d7 100644
301 301 $wp_object_cache->__remoteset(); 302 302 } 303 303 wp_cache_flush(); 304 wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details' ) );304 wp_cache_add_global_groups( array( 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details', 'site_meta' ) ); 305 305 wp_cache_add_non_persistent_groups( array( 'comment', 'counts', 'plugins' ) ); 306 306 } 307 307 -
tests/phpunit/tests/cache.php
diff --git tests/phpunit/tests/cache.php tests/phpunit/tests/cache.php index 6c2eb77..6a27080 100644
22 22 global $wp_object_cache; 23 23 $cache_class = get_class( $wp_object_cache ); 24 24 $cache = new $cache_class(); 25 $cache->add_global_groups( array( 'global-cache-test', 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details' ) );25 $cache->add_global_groups( array( 'global-cache-test', 'users', 'userlogins', 'usermeta', 'user_meta', 'useremail', 'userslugs', 'site-transient', 'site-options', 'blog-lookup', 'blog-details', 'rss', 'global-posts', 'blog-id-cache', 'networks', 'sites', 'site-details', 'site_meta' ) ); 26 26 return $cache; 27 27 } 28 28