Changeset 8220
- Timestamp:
- 02/11/2019 03:43:41 PM (6 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-event/class-event-admin.php
r8135 r8220 403 403 404 404 /** 405 * Save metadata from form 405 * Save metadata from form. 406 * 407 * @param int $post_id The ID of the post being saved. 408 * @param WP_Post $post The post being saved. 409 * @param bool $verify_nonce Whether or not to verify the nonce. Set to false when calling manually, leave 410 * true when calling via `save_post` hook. 406 411 * 407 412 * @hook save_post 408 413 */ 409 public function metabox_save( $post_id, $post ) {414 public function metabox_save( $post_id, $post, $verify_nonce = true ) { 410 415 // Don't add/remove meta on revisions and auto-saves. 411 416 if ( wp_is_post_autosave( $post_id ) || wp_is_post_revision( $post_id ) ) { … … 418 423 419 424 // Make sure the request came from the edit post screen. 420 if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'update-post_' . $post_id ) ) { 421 die( 'Unable to verify nonce' ); 425 if ( $verify_nonce ) { 426 if ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'update-post_' . $post_id ) ) { 427 wp_die( 'Unable to verify nonce.' ); 428 } 422 429 } 423 430 -
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-organizer-reminders/wcor-mailer.php
r8105 r8220 163 163 // Make sure postmeta is synced with $_POST when this is called in the middle of updating a post 164 164 if ( did_action( 'transition_post_status' ) || did_action( 'save_post' ) ) { 165 $wordcamp_admin->metabox_save( $wordcamp->ID, $wordcamp );165 $wordcamp_admin->metabox_save( $wordcamp->ID, $wordcamp, false ); 166 166 } 167 167
Note: See TracChangeset
for help on using the changeset viewer.