Making WordPress.org


Ignore:
Timestamp:
08/23/2018 09:47:59 PM (6 years ago)
Author:
vedjain
Message:

WordCamp: Added list of original values wcpt_metabox_save_done do_action so that any callback can use original values to see if anything is changed.
Also make use of original values in update_venue_address and fix a bug where it was always returning early because $new_address has already just been saved to the post meta.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-event/class-event-admin.php

    r7608 r7629  
    358358
    359359        $meta_keys = $this->meta_keys();
     360        $orig_meta_values = get_post_meta( $post_id );
    360361
    361362        foreach ( $meta_keys as $key => $value ) {
     
    407408        }
    408409
    409         do_action( 'wcpt_metabox_save_done', $post_id );
     410        do_action( 'wcpt_metabox_save_done', $post_id, $orig_meta_values );
    410411
    411412        $this->validate_and_add_note( $post_id );
Note: See TracChangeset for help on using the changeset viewer.