Plugin Directory

Changeset 3040301


Ignore:
Timestamp:
02/23/2024 03:07:44 PM (2 years ago)
Author:
gravitywp
Message:

Bump GravityWP - Count to version 0.9.10. Fix for greater_than and less_than operators not working.

Location:
gravitywp-count
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • gravitywp-count/trunk/gravitywp-count.php

    r2848034 r3040301  
    55 * Description: Adds a shortcode to count, filter and display Gravity Forms entries or the total of a number field in multiple entries.
    66 * Author: GravityWP
    7  * Version: 0.9.9
     7 * Version: 0.9.10
    88 * Author URI: https://gravitywp.com/add-on/count/
    99 * License: GPL2
     
    237237        }
    238238
     239        /** Replace greather_than and less_than operators with < or > */
     240        if ( isset ( $search_criteria ) && array_key_exists( 'field_filters', $search_criteria ) ) {
     241            foreach( $search_criteria['field_filters'] as $index => $filter ) {
     242                if ( is_array( $filter ) ) {
     243                    if( array_key_exists( 'operator', $filter ) && $filter['operator'] === 'greater_than' ) {
     244                        $search_criteria['field_filters'][$index]['operator'] = '>';
     245                    }
     246                    if( array_key_exists( 'operator', $filter ) && $filter['operator'] === 'less_than' ) {
     247                        $search_criteria['field_filters'][$index]['operator'] = '<';
     248                    }
     249                }
     250            }
     251        }
     252
    239253        $formids      = explode( ',', $formids );
    240254        $countentries = GFAPI::count_entries( $formids, $search_criteria );
  • gravitywp-count/trunk/readme.txt

    r3008594 r3040301  
    44Tags: gravity forms, number field, count, form, forms, gravity form
    55Requires at least: 3.0.1
    6 Tested up to: 6.4
    7 Stable tag: 0.9.9
     6Tested up to: 6.3
     7Stable tag: 0.9.10
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3232
    3333== Changelog ==
     34
     35= 0.9.10 =
     36* Fix for greater_than and less_than operators not working.
    3437
    3538= 0.9.9 =
Note: See TracChangeset for help on using the changeset viewer.