Changeset 7841
- Timestamp:
- 11/13/2018 03:18:20 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-event/tracker.php
r7607 r7841 24 24 */ 25 25 function get_active_wordcamps() { 26 global $wpdb; 26 27 $wordcamps = array(); 27 28 $statuses = WordCamp_Loader::get_post_statuses(); … … 32 33 unset( $shown_statuses[ WCPT_FINAL_STATUS ] ); 33 34 $shown_statuses = array_keys( $shown_statuses ); 35 $wordcamp_post_type = WCPT_POST_TYPE_ID; 36 37 $wordcamp_post_objs = $wpdb->get_results( 38 $wpdb->prepare( 39 " 40 SELECT DISTINCT post_id 41 FROM {$wpdb->prefix}postmeta 42 WHERE 43 meta_key like '_status_change_log_$wordcamp_post_type%' 44 AND 45 meta_value >= %d 46 ", 47 $inactive_timestamp 48 ) 49 ); 50 $wordcamp_post_ids = wp_list_pluck( $wordcamp_post_objs, 'post_id' ); 34 51 35 52 $raw_posts = get_posts( … … 37 54 'post_type' => WCPT_POST_TYPE_ID, 38 55 'post_status' => $shown_statuses, 39 'posts_per_page' => 300,56 'posts_per_page' => -1, 40 57 'order' => 'ASC', 41 58 'orderby' => 'post_title', 59 'post__in' => $wordcamp_post_ids, 42 60 ) 43 61 ); … … 45 63 foreach ( $raw_posts as $key => $post ) { 46 64 $last_update_timestamp = get_last_update_timestamp( $post->ID ); 47 48 if ( $last_update_timestamp <= $inactive_timestamp ) {49 continue;50 }51 65 52 66 $wordcamps[] = array(
Note: See TracChangeset
for help on using the changeset viewer.