Changeset 2298059
- Timestamp:
- 05/04/2020 10:55:41 PM (6 years ago)
- Location:
- wprequal/trunk
- Files:
-
- 3 edited
-
app/classes/class.SurveyFormAdmin.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
-
wprequal.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wprequal/trunk/app/classes/class.SurveyFormAdmin.php
r2296871 r2298059 41 41 add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) ); 42 42 add_action( "save_post_{$this->post_type}", array( $this, 'save_slides' ), 10, 1 ); 43 add_action( "save_post", array( $this, 'save_survey_popup' ), 10, 1 ); 43 add_action( 'save_post_post', array( $this, 'save_survey_popup' ), 10, 1 ); 44 add_action( 'save_post_page', array( $this, 'save_survey_popup' ), 10, 1 ); 44 45 45 46 add_filter( "bulk_actions-edit-{$this->post_type}", array( $this, 'custom_bulk_actions' ), 99 ); … … 392 393 public function save_survey_popup( $post_id ) { 393 394 394 global $wprequal ;395 global $wprequal, $typenow; 395 396 396 397 if ( ! current_user_can( WPREQUAL_CAP ) ) { … … 402 403 } 403 404 405 if ( 'post' !== $typenow && 'page' !== $typenow ) { 406 return; 407 } 408 409 if ( ! isset( $_POST['wpq_survey_form'] ) ) { 410 return; 411 } 412 413 if ( ! isset( $_POST['wpq_survey_form_nonce'] ) ) { 414 return; 415 } 416 404 417 if ( ! check_admin_referer( 'wpq_survey_form', 'wpq_survey_form_nonce' ) ) { 405 418 return; 406 419 } 407 420 408 if ( isset( $_POST['wpq_survey_form'] ) ) { 409 410 $survey_id = absint( $_POST['wpq_survey_form'] ); 411 412 if ( 0 < $survey_id && $wprequal->status( 1 ) ) { 413 414 update_post_meta( $post_id, 'wpq_survey_form', $survey_id ); 415 416 } else { 417 418 delete_post_meta( $post_id, 'wpq_survey_form' ); 419 420 } 421 $survey_id = absint( $_POST['wpq_survey_form'] ); 422 423 if ( 0 < $survey_id && $wprequal->status( 1 ) ) { 424 425 update_post_meta( $post_id, 'wpq_survey_form', $survey_id ); 426 427 } else { 428 429 delete_post_meta( $post_id, 'wpq_survey_form' ); 421 430 422 431 } -
wprequal/trunk/readme.txt
r2297103 r2298059 159 159 == Change Log == 160 160 161 = 7.6.7 = 162 * Bug Fix - Prevent save post type conflicts with other plugins 163 161 164 = 7.6.6 = 162 165 * Bug Fix - Get corrct posts id for survey forms on posts and pages -
wprequal/trunk/wprequal.php
r2296877 r2298059 4 4 Plugin URI: https://wprequal.com 5 5 Description: Mortgage and Real Estate Lead Capture System 6 Version: 7.6. 66 Version: 7.6.7 7 7 Author: WPrequal 8 8 Author URI: https://wprequal.com … … 30 30 // Defines 31 31 $defines = array( 32 'WPREQUAL_VERSION' => '7.6. 6',32 'WPREQUAL_VERSION' => '7.6.7', 33 33 'WPREQUAL_OPTIONS' => 'wprequal_options', 34 34 'WPREQUAL_ACCESS_TOKEN_KEY' => 'wprequal_access_token',
Note: See TracChangeset
for help on using the changeset viewer.