- Timestamp:
- 03/09/2017 09:18:39 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/events/1.0/index.php
r5137 r5138 10 10 11 11 bootstrap(); 12 wp_cache_init(); 12 13 13 14 // The test suite just needs the functions defined and doesn't want any headers or output … … 15 16 return; 16 17 } 17 18 wp_cache_init();19 18 20 19 $cache_group = 'events'; … … 211 210 212 211 function get_location( $args = array() ) { 212 global $cache_life, $cache_group; 213 214 $cache_key = 'get_location:' . md5( serialize( $args ) ); 215 $location = wp_cache_get( $cache_key, $cache_group ); 216 217 if ( false !== $location ) { 218 return $location; 219 } 213 220 214 221 // For a country request, no lat/long are returned. … … 285 292 } 286 293 294 wp_cache_set( $cache_key, $location, $cache_group, $cache_life ); 287 295 return $location; 288 296 }
Note: See TracChangeset
for help on using the changeset viewer.