Plugin Directory

Changeset 2298059


Ignore:
Timestamp:
05/04/2020 10:55:41 PM (6 years ago)
Author:
wprequal
Message:

Commit v7.6.7

Location:
wprequal/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wprequal/trunk/app/classes/class.SurveyFormAdmin.php

    r2296871 r2298059  
    4141        add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ) );
    4242        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 );
    4445
    4546        add_filter( "bulk_actions-edit-{$this->post_type}", array( $this, 'custom_bulk_actions' ), 99 );
     
    392393    public function save_survey_popup( $post_id ) {
    393394
    394         global $wprequal;
     395        global $wprequal, $typenow;
    395396
    396397        if ( ! current_user_can( WPREQUAL_CAP ) ) {
     
    402403        }
    403404
     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
    404417        if ( ! check_admin_referer( 'wpq_survey_form', 'wpq_survey_form_nonce' ) ) {
    405418            return;
    406419        }
    407420
    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' );
    421430
    422431        }
  • wprequal/trunk/readme.txt

    r2297103 r2298059  
    159159== Change Log ==
    160160
     161= 7.6.7 =
     162* Bug Fix - Prevent save post type conflicts with other plugins
     163
    161164= 7.6.6 =
    162165* Bug Fix - Get corrct posts id for survey forms on posts and pages
  • wprequal/trunk/wprequal.php

    r2296877 r2298059  
    44Plugin URI:  https://wprequal.com
    55Description: Mortgage and Real Estate Lead Capture System
    6 Version:     7.6.6
     6Version:     7.6.7
    77Author:      WPrequal
    88Author URI:  https://wprequal.com
     
    3030// Defines
    3131$defines = array(
    32     'WPREQUAL_VERSION'            => '7.6.6',
     32    'WPREQUAL_VERSION'            => '7.6.7',
    3333    'WPREQUAL_OPTIONS'            => 'wprequal_options',
    3434    'WPREQUAL_ACCESS_TOKEN_KEY'   => 'wprequal_access_token',
Note: See TracChangeset for help on using the changeset viewer.