GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | Private Member Functions
GravityView_oEmbed Class Reference

Register oEmbed handlers for embedding GravityView data and render that data. More...

Public Member Functions

 add_provider ()
 Become an oEmbed provider for GravityView. More...
 
 get_entry_id ()
 Get the entry id for the current oEmbedded entry. More...
 
 initialize ()
 
 register_handler ()
 Register the oEmbed handler. More...
 
 render_handler ( $matches, $attr, $url, $rawattr)
 
 render_provider_request ()
 Output a response as a provider for an entry oEmbed URL. More...
 
 set_single_entry_id ( $is_single_entry=false)
 Tell get_gravityview() to display a single entry. More...
 

Static Public Member Functions

static getInstance ()
 

Static Public Attributes

static $instance = NULL
 

Protected Attributes

 $entry_id = NULL
 

Private Member Functions

 __construct ()
 

Detailed Description

Register oEmbed handlers for embedding GravityView data and render that data.

Since
1.6

Definition at line 22 of file class-oembed.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )
private

Definition at line 27 of file class-oembed.php.

Member Function Documentation

◆ add_provider()

add_provider ( )

Become an oEmbed provider for GravityView.

Returns
void

Definition at line 72 of file class-oembed.php.

References gravityview().

◆ get_entry_id()

get_entry_id ( )

Get the entry id for the current oEmbedded entry.

Since
1.6
Returns
int|null

Definition at line 102 of file class-oembed.php.

References $entry_id, and gravityview().

◆ getInstance()

static getInstance ( )
static
Returns
GravityView_oEmbed
Since
1.6

Definition at line 42 of file class-oembed.php.

References gravityview().

Referenced by GravityView_Edit_Entry_Render\user_can_edit_entry().

◆ initialize()

initialize ( )

Definition at line 32 of file class-oembed.php.

References gravityview().

◆ register_handler()

register_handler ( )

Register the oEmbed handler.

Since
1.6

Definition at line 60 of file class-oembed.php.

References gravityview().

◆ render_handler()

render_handler (   $matches,
  $attr,
  $url,
  $rawattr 
)
Since
1.6
See also
GravityView_oEmbed::add_providers() for the regex
Parameters
array$matchesThe regex matches from the provided regex when calling wp_embed_register_handler()
array$attrEmbed attributes.
string$urlThe original URL that was matched by the regex.
array$rawattrThe original unmodified attributes.
Returns
string The embed HTML.

Definition at line 119 of file class-oembed.php.

References gravityview().

◆ render_provider_request()

render_provider_request ( )

Output a response as a provider for an entry oEmbed URL.

For now we only output the JSON format and don't care about the size (width, height). Our only current use-case is for it to provide output to the Add Media / From URL box in WordPress 4.8.

Since
1.21.5.3
Returns
void

Definition at line 89 of file class-oembed.php.

References gravityview().

◆ set_single_entry_id()

set_single_entry_id (   $is_single_entry = false)

Tell get_gravityview() to display a single entry.

REQUIRED FOR THE VIEW TO OUTPUT A SINGLE ENTRY

Parameters
bool | int$is_single_entryExisting single entry. False, because GV thinks we're in a post or page.
Returns
int The current entry ID

Definition at line 135 of file class-oembed.php.

References $entry_id, and gravityview().

Field Documentation

◆ $entry_id

$entry_id = NULL
protected

Definition at line 23 of file class-oembed.php.

Referenced by get_entry_id(), and set_single_entry_id().

◆ $instance

$instance = NULL
static

Definition at line 25 of file class-oembed.php.


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