Plugin Directory

Changeset 3112689


Ignore:
Timestamp:
07/04/2024 04:12:08 PM (21 months ago)
Author:
samuelaguilera
Message:

1.5.2

  • Added support for the conversational_form post type introduced in the Conversational Forms add-on 1.3.0 version.
  • Moved check for force options (setting and filter) to an earlier stage.
Location:
fresh-forms-for-gravity/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fresh-forms-for-gravity/trunk/class-fresh-forms-for-gravity.php

    r3075001 r3112689  
    349349        }
    350350
    351         // Allow forcing Fresh Form run for certain post ID's without doing the checkings.
    352         $force_has_form = $this->get_plugin_setting( 'force_has_form' ) ? $this->get_plugin_setting( 'force_has_form' ) : '';
    353         // Remove any empty spaces and convert to array.
    354         $force_has_form = array_map( 'intval', explode( ',', preg_replace( '/\s+/', '', $force_has_form ) ) );
    355 
    356         $post_has_gform = apply_filters( 'freshforms_post_has_gform', $force_has_form );
    357 
    358         if ( ! empty( $post_has_gform ) && in_array( $post->ID, $post_has_gform, true ) ) {
    359             $this->log_debug( __METHOD__ . "(): Form detection forced to return true by setting or filter for post ID {$post->ID}." );
    360             return true;
    361         }
    362 
    363351        // Check for GF shortcode.
    364352        if ( true === $this->find_gf_shortcode( $post->post_content ) ) {
     
    733721        }
    734722
     723        // Allow forcing Fresh Form run for certain post ID's without doing the checkings.
     724        $force_has_form = $this->get_plugin_setting( 'force_has_form' ) ? $this->get_plugin_setting( 'force_has_form' ) : '';
     725        // Remove any empty spaces and convert to array.
     726        $force_has_form = array_map( 'intval', explode( ',', preg_replace( '/\s+/', '', $force_has_form ) ) );
     727        // Allow settings to be filtered.
     728        $force_has_form = apply_filters( 'freshforms_post_has_gform', $force_has_form );
     729
     730        // Exclude posts if any ID was provided.
     731        if ( ! empty( $force_has_form ) && in_array( $post_id, $force_has_form, true ) ) {
     732            $this->log_debug( __METHOD__ . "(): Form detection forced to return true by setting or filter for post ID {$post_id}." );
     733            return true;
     734        }
     735
     736        // Get the post_type for Conversational Forms check.
     737        $post_type = get_post_type( $post_id );
     738        $this->log_debug( __METHOD__ . "(): Post Type is {$post_type}" );
     739
     740        // Exclude Conversational Forms pages.
     741        if ( ! empty( $post_type ) && 'conversational_form' === $post_type ) {
     742            $this->log_debug( __METHOD__ . '(): Conversational Forms page detected!' );
     743            return true;
     744        }
     745
     746        // Now we want the full post.
    735747        $post = get_post( $post_id );
    736748
  • fresh-forms-for-gravity/trunk/fresh-forms-for-gravity.php

    r3075001 r3112689  
    44 * Description: Prevent supported caching and JS optimization plugins breaking Gravity Forms.
    55 * Author: Samuel Aguilera
    6  * Version: 1.5
     6 * Version: 1.5.2
    77 * Author URI: https://www.samuelaguilera.com
    88 * Text Domain: fresh-forms-for-gravity
     
    2727*/
    2828
    29 define( 'FRESH_FORMS_FOR_GRAVITY_VERSION', '1.5' );
     29define( 'FRESH_FORMS_FOR_GRAVITY_VERSION', '1.5.2' );
    3030
    3131// Scripts handlers for plugins using them for exclusion filters (e.g. SG Optimizer or Hummingbird). - Defined here to allow WordPress functions to access them.
  • fresh-forms-for-gravity/trunk/readme.txt

    r3101018 r3112689  
    33Tags: Gravity Forms, gravityforms, cache, caching
    44Requires at least: 4.9
    5 Tested up to: 6.5.4
    6 Stable tag: 1.5
     5Tested up to: 6.5.5
     6Stable tag: 1.5.2
    77Requires PHP: 7.0
    88License: GPLv3
     
    2929* **Avada**. The following elements has been proven to work: Content Boxes, "Gravity Form", Modal, Text Block. Other elements could work too, but not tested.
    3030* **Beaver Builder**. It will detect Gravity Forms shortcodes added to a Text Editor module.
     31* **Conversational Forms** add-on. It will automatically detect any form page using the **conversational_form** post type (requires Conversational Forms add-on 1.3.0+).
    3132* **Divi**. It should work with any of the default modules where you can insert a GF shortcode into the content. e.g. Call To Action, Text, Tabs...
    3233* **Elementor**. The following widgets added to the post content are supported: Shortcode, Text.
     
    163164== Changelog ==
    164165
     166= 1.5.2 =
     167
     168* Added support for the conversational_form post type introduced in the Conversational Forms add-on 1.3.0 version.
     169* Moved check for force options (setting and filter) to an earlier stage.
     170
    165171= 1.5 =
    166172
Note: See TracChangeset for help on using the changeset viewer.