Plugin Directory

Changeset 3413232


Ignore:
Timestamp:
12/06/2025 09:21:11 PM (4 months ago)
Author:
wpSight
Message:

improved logic

Location:
wpcasa-contact-form-7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wpcasa-contact-form-7/tags/1.4.0/wpcasa-contact-form-7.php

    r3413227 r3413232  
    155155    public function listing_form() {
    156156
    157         if( wpsight_get_option( 'contact_form_7_listing_form_id' ) && wpsight_get_option( 'contact_form_7_listing_form_show_unavailable_listings' ) ) {
     157        $show = true;
     158
     159        if( ! wpsight_get_option( 'contact_form_7_listing_form_show_unavailable_listings' ) && wpsight_is_listing_not_available() ) {
     160            $show = false;
     161        }
     162
     163        if( wpsight_get_option( 'contact_form_7_listing_form_id' ) && $show ) {
    158164           
    159165            $contact_form = wpcf7_contact_form( self::wpcf7_contact_form_id() );
  • wpcasa-contact-form-7/trunk/wpcasa-contact-form-7.php

    r3413227 r3413232  
    155155    public function listing_form() {
    156156
    157         if( wpsight_get_option( 'contact_form_7_listing_form_id' ) && wpsight_get_option( 'contact_form_7_listing_form_show_unavailable_listings' ) ) {
     157        $show = true;
     158
     159        if( ! wpsight_get_option( 'contact_form_7_listing_form_show_unavailable_listings' ) && wpsight_is_listing_not_available() ) {
     160            $show = false;
     161        }
     162
     163        if( wpsight_get_option( 'contact_form_7_listing_form_id' ) && $show ) {
    158164           
    159165            $contact_form = wpcf7_contact_form( self::wpcf7_contact_form_id() );
Note: See TracChangeset for help on using the changeset viewer.