Plugin Directory

Changeset 2296877


Ignore:
Timestamp:
05/02/2020 11:47:07 PM (6 years ago)
Author:
wprequal
Message:

Commit v7.6.6

Location:
wprequal/trunk
Files:
3 edited

Legend:

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

    r2296858 r2296877  
    307307    public function popup() {
    308308
    309         $post_id = get_option( 'wprequal_popup_post_id' );
    310 
    311         if ( empty( $post_id ) || FALSE === get_post_status( $post_id ) ) {
    312             $post_id = $this->default_id();
    313         }
     309        $post_id = $this->popup_id();
    314310
    315311        if ( $view = apply_filters( 'wprequal_view', 'survey/form/popup' ) ) {
    316312            include $view;
    317313        }
     314
     315    }
     316
     317    /**
     318     * Survey form id for the popup.
     319     *
     320     * @return int
     321     */
     322
     323    public function popup_id() {
     324
     325        if ( ( is_page() || is_single() ) && get_post_meta( get_the_ID(), 'wpq_survey_form', TRUE ) ) {
     326
     327            $post_id = get_post_meta( get_the_ID(), 'wpq_survey_form', TRUE );
     328
     329        } else {
     330
     331            $post_id = get_option( 'wprequal_popup_post_id' );
     332
     333        }
     334
     335        if ( empty( $post_id ) || FALSE === get_post_status( $post_id ) ) {
     336            return $this->default_id();
     337        }
     338
     339        return (int) $post_id;
    318340
    319341    }
  • wprequal/trunk/readme.txt

    r2296871 r2296877  
    159159== Change Log ==
    160160
     161= 7.6.6 =
     162* Bug Fix - Get corrct posts id for survey forms on posts and pages
     163
    161164= 7.6.5 =
    162165* Tweek - Allow survey popups on posts and pages only
  • wprequal/trunk/wprequal.php

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