Changeset 701
- Timestamp:
- 06/12/2014 10:32:24 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-organizer-reminders/wcor-mailer.php
r700 r701 322 322 * isn't scheduled until 2 months before the start). When that happens, we want to send all the e-mails that they've missed. 323 323 * 324 * We don't want newly created messages to be retroactively sent to all WordCamps that occurred before the e-mail was created though, so we 325 * only send messages to camps that were created after the e-mail was created. 326 * 324 327 * @todo It'd be nice to have some unit tests for this function, since there are a lot of different cases, but it seems like that might be 325 328 * hard to do because of having to mock get_post_meta(), current_time(), etc. We could pass that info in, but that doesn't seem very elegant. … … 331 334 */ 332 335 protected function timed_email_is_ready_to_send( $wordcamp, $email, $sent_email_ids ) { 333 $ready = false; 336 $ready = false; 337 338 if ( strtotime( $wordcamp->post_date ) < strtotime( $email->post_date ) ) { 339 return $ready; 340 } 341 334 342 $send_when = get_post_meta( $email->ID, 'wcor_send_when', true ); 335 343 $start_date = get_post_meta( $wordcamp->ID, 'Start Date (YYYY-mm-dd)', true ); … … 339 347 $end_date = $start_date; 340 348 } 341 349 342 350 if ( ! in_array( $email->ID, $sent_email_ids ) ) { 343 351 if ( 'wcor_send_before' == $send_when ) {
Note: See TracChangeset
for help on using the changeset viewer.