19 if ( is_callable(
'parent::get_database_version' ) ) {
20 return parent::get_database_version();
23 return get_option(
'gf_db_version' );
42 if ( in_array( $source_field, array(
'date_created',
'date_updated',
'payment_date' ),
true ) ) {
44 $target_value = is_int( $target_value )? $target_value : strtotime( $target_value );
47 if ( $source_field instanceof GF_Field && $source_field->type ==
'date' ) {
49 $target_value = is_int( $target_value )? $target_value : strtotime( $target_value );
52 if ( in_array( $_operation = str_replace(
' ',
'_', trim( $operation ) ), array(
'in',
'not_in' ) ) ) {
56 return parent::is_value_match(
$field_value, $target_value, $operation, $source_field, $rule,
$form );
75 $post_data = self::get_post_fields(
$form,
$entry );
77 $media = get_attached_media(
'image',
$entry[
'post_id'] );
79 $post_images = array();
81 foreach ( $media as $media_item ) {
82 foreach( (array) $post_data[
'images'] as $post_data_item ) {
84 \
GV\Utils::get( $post_data_item,
'title' ) === $media_item->post_title &&
85 \
GV\Utils::get( $post_data_item,
'description' ) === $media_item->post_content &&
86 \
GV\Utils::get( $post_data_item,
'caption' ) === $media_item->post_excerpt
88 $post_images[
"{$post_data_item['field_id']}"] = $media_item->ID;
110 $reflection =
new ReflectionMethod(
'GFFormsModel',
'get_post_fields' );
116 if( $reflection->isPublic() ) {
121 $reflection->setAccessible(
true );
137 $reflection =
new ReflectionMethod(
'GFFormsModel',
'copy_post_image' );
143 if( $reflection->isPublic() ) {
144 return parent::copy_post_image(
$url, $post_id );
148 $reflection->setAccessible(
true );
172 $reflection =
new ReflectionMethod(
'GFFormsModel',
'media_handle_upload' );
178 if( $reflection->isPublic() ) {
179 return parent::media_handle_upload(
$url, $post_id, $post_data );
183 $reflection->setAccessible(
true );
if(gravityview() ->plugin->is_GF_25()) $form
static matches_operation( $val1, $val2, $operation)
Wrapper for the GFFormsModel::matches_operation() method that adds additional comparisons, including: 'equals', 'greater_than_or_is', 'greater_than_or_equals', 'less_than_or_is', 'less_than_or_equals', 'not_contains', 'in', and 'not_in'.