Changeset 8374 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
- Timestamp:
- 02/28/2019 03:34:07 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
r8328 r8374 744 744 * @param WP_Post $wordcamp 745 745 * 746 * @return null|bool 746 * @return null|bool|string 747 747 */ 748 748 public static function notify_new_wordcamp_in_slack( $wordcamp ) { 749 $scheduled_notification_key = 'sent_scheduled_notification'; 750 if ( get_post_meta( $wordcamp->ID, $scheduled_notification_key, true ) ) { 751 return null; 752 } 753 749 754 // Not translating any string because they will be sent to slack. 750 755 $city = get_post_meta( $wordcamp->ID, 'Location', true ); … … 762 767 $attachment = create_event_status_attachment( $message, $wordcamp->ID, $title ); 763 768 764 return wcpt_slack_notify( COMMUNITY_EVENTS_SLACK, $attachment ); 769 $notification_sent = wcpt_slack_notify( COMMUNITY_EVENTS_SLACK, $attachment ); 770 if ( $notification_sent ) { 771 update_post_meta( $wordcamp->ID, $scheduled_notification_key, true ); 772 } 773 return $notification_sent; 765 774 } 766 775
Note: See TracChangeset
for help on using the changeset viewer.