Changeset 7913
- Timestamp:
- 11/29/2018 03:19:23 AM (7 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes
- Files:
-
- 2 edited
-
common.php (modified) (3 diffs)
-
indesign-badges.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/common.php
r6768 r7913 72 72 * @param string $registered_after Reduce fetched attendees by their registration date. Any value parseable 73 73 * by strtotime(). 74 * @param string $admin_flag Filter fetched attendees to only those who have the given admin flag 75 * assigned. 74 76 * 75 77 * @todo Maybe optimize this by looking at post_date rather than tix_timestamp … … 77 79 * @return array 78 80 */ 79 function get_attendees( $ticket_ids = 'all', $registered_after = '' ) {81 function get_attendees( $ticket_ids = 'all', $registered_after = '', $admin_flag = '' ) { 80 82 $params = array( 81 83 'post_type' => 'tix_attendee', … … 103 105 104 106 $attendees = get_posts( $params ); 107 108 if ( '' !== $admin_flag ) { 109 $attendees = array_filter( $attendees, function( $attendee ) use ( $admin_flag ) { 110 $flags = get_post_meta( $attendee->ID, 'camptix-admin-flag' ); 111 112 return in_array( $admin_flag, $flags, true ); 113 } ); 114 } 105 115 106 116 return $attendees; -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/camptix-badge-generator/includes/indesign-badges.php
r6768 r7913 34 34 'ticket_ids' => 'all', 35 35 'registered_after' => '', 36 'admin_flag' => '', 36 37 ), 37 38 $options … … 45 46 $zip_filename = get_zip_filename( $assets_folder ); 46 47 $zip_local_folder = pathinfo( $zip_filename, PATHINFO_FILENAME ); 47 $attendees = Badge_Generator\get_attendees( $options['ticket_ids'], $options['registered_after'] );48 $attendees = Badge_Generator\get_attendees( $options['ticket_ids'], $options['registered_after'], $options['admin_flag'] ); 48 49 49 50 wp_mkdir_p( $gravatar_folder );
Note: See TracChangeset
for help on using the changeset viewer.