GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
class-gravityview-field-post-id.php
Go to the documentation of this file.
1 <?php
2 /**
3  * @file class-gravityview-field-post-id.php
4  * @package GravityView
5  * @subpackage includes\fields
6  * @since 1.7
7  */
8 
9 /**
10  * Add custom options for Post ID fields
11  *
12  * @since 1.7
13  */
15 
16  var $name = 'post_id';
17 
18  var $is_searchable = true;
19 
20  var $search_operators = array( 'is', 'isnot', 'greater_than', 'less_than' );
21 
22  var $group = 'post';
23 
24  /**
25  * GravityView_Field_Post_ID constructor.
26  */
27  public function __construct() {
28  $this->label = esc_html__( 'Post ID', 'gk-gravityview' );
29  parent::__construct();
30  }
31 
32  public function field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id ) {
33 
34  $this->add_field_support('link_to_post', $field_options );
35 
36  return $field_options;
37  }
38 
39 }
40 
Modify field settings by extending this class.
$is_searchable
$name
add_field_support( $key, &$field_options)
new GravityView_Field_Post_ID
Add custom options for Post ID fields.
__construct()
GravityView_Field_Post_ID constructor.
field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id)
if(empty( $created_by)) $form_id
$search_operators
if(false !==strpos( $value, '00:00')) $field_id
string $field_id ID of the field being displayed
Definition: time.php:22
$group