Changeset 3112689
- Timestamp:
- 07/04/2024 04:12:08 PM (21 months ago)
- Location:
- fresh-forms-for-gravity/trunk
- Files:
-
- 3 edited
-
class-fresh-forms-for-gravity.php (modified) (2 diffs)
-
fresh-forms-for-gravity.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fresh-forms-for-gravity/trunk/class-fresh-forms-for-gravity.php
r3075001 r3112689 349 349 } 350 350 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 363 351 // Check for GF shortcode. 364 352 if ( true === $this->find_gf_shortcode( $post->post_content ) ) { … … 733 721 } 734 722 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. 735 747 $post = get_post( $post_id ); 736 748 -
fresh-forms-for-gravity/trunk/fresh-forms-for-gravity.php
r3075001 r3112689 4 4 * Description: Prevent supported caching and JS optimization plugins breaking Gravity Forms. 5 5 * Author: Samuel Aguilera 6 * Version: 1.5 6 * Version: 1.5.2 7 7 * Author URI: https://www.samuelaguilera.com 8 8 * Text Domain: fresh-forms-for-gravity … … 27 27 */ 28 28 29 define( 'FRESH_FORMS_FOR_GRAVITY_VERSION', '1.5 ' );29 define( 'FRESH_FORMS_FOR_GRAVITY_VERSION', '1.5.2' ); 30 30 31 31 // 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 3 3 Tags: Gravity Forms, gravityforms, cache, caching 4 4 Requires at least: 4.9 5 Tested up to: 6.5. 46 Stable tag: 1.5 5 Tested up to: 6.5.5 6 Stable tag: 1.5.2 7 7 Requires PHP: 7.0 8 8 License: GPLv3 … … 29 29 * **Avada**. The following elements has been proven to work: Content Boxes, "Gravity Form", Modal, Text Block. Other elements could work too, but not tested. 30 30 * **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+). 31 32 * **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... 32 33 * **Elementor**. The following widgets added to the post content are supported: Shortcode, Text. … … 163 164 == Changelog == 164 165 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 165 171 = 1.5 = 166 172
Note: See TracChangeset
for help on using the changeset viewer.