Changeset 7684
- Timestamp:
- 09/20/2018 08:36:21 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-participation-notifier/wordcamp-participation-notifier.php
r4279 r7684 20 20 add_action( 'camptix_rl_registration_confirmed', array( $this, 'additional_attendee_confirmed_registration' ), 10, 2 ); 21 21 add_action( 'added_post_meta', array( $this, 'attendee_checked_in' ), 10, 4 ); 22 add_action( 'update_meetup_organizers', array( $this, 'update_meetup_organizers' ), 10, 2 ); 22 23 } 23 24 … … 48 49 $this->speaker_post_published_or_unpublished( $new_status, $old_status, $post ); 49 50 } 51 } 52 53 /** 54 * Add badges to meetup organizers. 55 * 56 * @param array $organizers 57 * @param WP_Post $post 58 * 59 * @return mixed 60 */ 61 public function update_meetup_organizers( $organizers, $post ) { 62 if ( empty( $organizers ) ) { 63 return; 64 } 65 66 return $this->remote_post( self::PROFILES_HANDLER_URL, $this->get_meetup_org_payload( $organizers, $post ) ); 67 } 68 69 /** 70 * Helper function to create post data for AJAX request 71 * 72 * @param array $organizers 73 * @param WP_Post $post 74 * 75 * @return array 76 */ 77 protected function get_meetup_org_payload( $organizers, $post ) { 78 $association = array( 79 'action' => 'wporg_handle_association', 80 'source' => 'meetups', 81 'command' => 'add', 82 'users' => $organizers, 83 'meetup_id' => $post->ID, 84 'association' => 'meetup-organizer' 85 ); 86 87 return apply_filters( 'wp_meetup_organizer_association_payload', $association, $post ); 50 88 } 51 89
Note: See TracChangeset
for help on using the changeset viewer.