GravityView  2.1.1
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Static Public Member Functions | Private Member Functions
Request Class Reference

If this file is called directly, abort. More...

Inheritance diagram for Request:
Admin_Request Frontend_Request Mock_Request Request

Public Member Functions

 __construct ()
 
 is_edit_entry ( $form_id=0)
 Checks whether this an edit entry request. More...
 
 is_entry ( $form_id=0)
 Checks whether this is a single entry request. More...
 
 is_search ()
 Checks whether this an entry search request. More...
 
 is_view ()
 The current $post is a View, no? More...
 

Static Public Member Functions

static is_add_oembed_preview ()
 Is this the Add Media / From URL preview request? More...
 
static is_admin ()
 Check if WordPress is_admin(), and make sure not DOING_AJAX. More...
 
static is_ajax ()
 Is this an AJAX call in progress? More...
 
static is_frontend ()
 This is the frontend. More...
 
static is_rest ()
 Is this a REST request? Call after parse_request. More...
 

Private Member Functions

 _has_field_key ( $get)
 Calculate whether the $_REQUEST has a GravityView field. More...
 

Detailed Description

If this file is called directly, abort.

The Request abstract class.

Knows more about the request than anyone else.

Definition at line 14 of file class-gv-request.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Definition at line 15 of file class-gv-request.php.

Member Function Documentation

◆ _has_field_key()

_has_field_key (   $get)
private

Calculate whether the $_REQUEST has a GravityView field.

Definition at line 183 of file class-gv-request.php.

References $field, $value, GravityView_Fields\get_all(), and gravityview().

◆ is_add_oembed_preview()

static is_add_oembed_preview ( )
static

Is this the Add Media / From URL preview request?

Will not work in WordPress 4.8+

Returns
boolean

The preview request is a parse-embed AJAX call without a type set.

Definition at line 46 of file class-gv-request.php.

◆ is_admin()

static is_admin ( )
static

Check if WordPress is_admin(), and make sure not DOING_AJAX.

Returns
boolean

Definition at line 23 of file class-gv-request.php.

◆ is_ajax()

static is_ajax ( )
static

Is this an AJAX call in progress?

Returns
boolean

Definition at line 56 of file class-gv-request.php.

◆ is_edit_entry()

is_edit_entry (   $form_id = 0)

Checks whether this an edit entry request.

Since
2.0
Parameters
int$form_idThe form ID, since slugs can be non-unique. Default: 0.
Returns
|false The entry requested or false.
Runs Filter:
gravityview_is_edit_entry Whether we're currently on the Edit Entry screen
The Edit Entry functionality overrides this value.
Parameters
boolean$is_edit_entry

Definition at line 129 of file class-gv-request.php.

References $entry, and $form_id.

◆ is_entry()

is_entry (   $form_id = 0)

Checks whether this is a single entry request.

Since
2.0
Parameters
int$form_idThe form ID, since slugs can be non-unique. Default: 0.
Returns
|false The entry requested or false.

Definition at line 97 of file class-gv-request.php.

References $entries, $entry, and $form_id.

◆ is_frontend()

static is_frontend ( )
static

This is the frontend.

Returns
boolean True or false.

Definition at line 35 of file class-gv-request.php.

◆ is_rest()

static is_rest ( )
static

Is this a REST request? Call after parse_request.

Returns
boolean

Definition at line 65 of file class-gv-request.php.

◆ is_search()

is_search ( )

Checks whether this an entry search request.

Since
2.0
Returns
boolean True if this is a search request.

Definition at line 150 of file class-gv-request.php.

References $search_method.

◆ is_view()

is_view ( )

The current $post is a View, no?

Since
2.0
Returns
|false The view requested or false

Definition at line 78 of file class-gv-request.php.

References $post.


The documentation for this class was generated from the following file: