Changeset 7629 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
- Timestamp:
- 08/23/2018 09:47:59 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
r7607 r7629 56 56 add_action( 'plugins_loaded', array( $this, 'schedule_cron_jobs' ), 11 ); 57 57 add_action( 'wcpt_close_wordcamps_after_event', array( $this, 'close_wordcamps_after_event' ) ); 58 add_action( 'wcpt_metabox_save_done', array( $this, 'update_venue_address' ) );58 add_action( 'wcpt_metabox_save_done', array( $this, 'update_venue_address' ), 10, 2 ); 59 59 add_action( 'wcpt_metabox_save_done', array( $this, 'update_mentor' ) ); 60 60 } … … 152 152 * These are used for the maps on Central, stats, etc. 153 153 * 154 * @param int $post_id Post id 155 */ 156 public function update_venue_address( $post_id ) { 154 * @param int $post_id Post id 155 * @param array $original_meta_values Original meta values before save 156 */ 157 public function update_venue_address( $post_id, $original_meta_values ) { 157 158 if ( $this->get_event_type() !== get_post_type() ) { 158 159 return; … … 161 162 // If the venue address was changed, update its coordinates 162 163 $new_address = $_POST[ wcpt_key_to_str( 'Physical Address', 'wcpt_' ) ]; 163 if ( $new_address === get_post_meta( $post_id, 'Physical Address', true )) {164 if ( $new_address === $original_meta_values['Physical Address'] ) { 164 165 return; 165 166 }
Note: See TracChangeset
for help on using the changeset viewer.