GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
includes
fields
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
*/
14
class
GravityView_Field_Post_ID
extends
GravityView_Field
{
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
41
new
GravityView_Field_Post_ID
;
GravityView_Field
Modify field settings by extending this class.
Definition:
class-gravityview-field.php:11
GravityView_Field_Post_ID\$is_searchable
$is_searchable
Definition:
class-gravityview-field-post-id.php:18
GravityView_Field_Post_ID\$name
$name
Definition:
class-gravityview-field-post-id.php:16
GravityView_Field\add_field_support
add_field_support( $key, &$field_options)
Definition:
class-gravityview-field.php:508
GravityView_Field_Post_ID
new GravityView_Field_Post_ID
Definition:
class-gravityview-field-post-id.php:41
GravityView_Field_Post_ID
Add custom options for Post ID fields.
Definition:
class-gravityview-field-post-id.php:14
GravityView_Field_Post_ID\__construct
__construct()
GravityView_Field_Post_ID constructor.
Definition:
class-gravityview-field-post-id.php:27
GravityView_Field_Post_ID\field_options
field_options( $field_options, $template_id, $field_id, $context, $input_type, $form_id)
Definition:
class-gravityview-field-post-id.php:32
$form_id
if(empty( $created_by)) $form_id
Definition:
other_entries.php:20
GravityView_Field_Post_ID\$search_operators
$search_operators
Definition:
class-gravityview-field-post-id.php:20
$field_id
if(false !==strpos( $value, '00:00')) $field_id
string $field_id ID of the field being displayed
Definition:
time.php:22
GravityView_Field_Post_ID\$group
$group
Definition:
class-gravityview-field-post-id.php:22