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

Abstract class that makes it easy for plugins and themes to register no-conflict scripts and styles, as well as add post meta keys for GravityView to parse when checking for the existence of shortcodes in content. More...

Inheritance diagram for GravityView_Plugin_and_Theme_Hooks:
GravityView_Plugin_Hooks_ACF GravityView_Plugin_Hooks_Debug_Bar GravityView_Plugin_Hooks_Gravity_Flow GravityView_Plugin_Hooks_Gravity_Forms GravityView_Plugin_Hooks_Gravity_Forms_Quiz GravityView_Plugin_Hooks_Gravity_Forms_Signature GravityView_Plugin_Hooks_Gravity_Forms_Survey GravityView_Plugin_Hooks_Gravity_Perks GravityView_Plugin_Hooks_WooCommerce GravityView_Plugin_Hooks_Yoast_SEO GravityView_Theme_Hooks_Avada GravityView_Theme_Hooks_Avia GravityView_Theme_Hooks_Church_Themes GravityView_Theme_Hooks_Elegant_Themes GravityView_Theme_Hooks_GeneratePress GravityView_Theme_Hooks_Genesis GravityView_Theme_Hooks_Ultimate_Member GravityView_Theme_Hooks_WooThemes GravityView_Theme_Hooks_WPML

Public Member Functions

 __construct ()
 GravityView_Theme_Support constructor. More...
 
 merge_content_meta_keys ($meta_keys=array(), $post_id=0)
 Merge plugin or theme meta keys that store shortcode data with existing keys to check. More...
 
 merge_noconflict_scripts ($handles)
 Merge plugin or theme scripts with existing no-conflict scripts. More...
 
 merge_noconflict_styles ($handles)
 Merge plugin or theme styles with existing no-conflict styles. More...
 
 merge_post_type_support ($supports=array(), $is_hierarchical=false)
 Merge plugin or theme post type support definitions with existing support values. More...
 

Protected Member Functions

 add_hooks ()
 Add filters for meta key and script/style handles, if defined. More...
 

Protected Attributes

 $class_name = false
 string Optional. More...
 
 $constant_name = false
 string Optional. More...
 
 $content_meta_keys = array()
 Define the keys to be parsed by the gravityview/data/parse/meta_keys hook. More...
 
 $function_name = false
 string Optional. More...
 
 $post_type_support = array()
 Define features in the admin editor used by the theme or plugin to be used when registering the GravityView post type. More...
 
 $script_handles = array()
 Define script handles used by the theme or plugin to be parsed by the gravityview/data/parse/meta_keys hook. More...
 
 $style_handles = array()
 Define style handles used by the theme or plugin to be parsed by the gravityview/data/parse/meta_keys hook. More...
 

Private Member Functions

 maybe_add_hooks ()
 Check whether plugin or theme exists. More...
 

Detailed Description

Abstract class that makes it easy for plugins and themes to register no-conflict scripts and styles, as well as add post meta keys for GravityView to parse when checking for the existence of shortcodes in content.

Since
1.15.2

Definition at line 22 of file abstract-gravityview-plugin-and-theme-hooks.php.

Constructor & Destructor Documentation

__construct ( )

GravityView_Theme_Support constructor.

Returns
void

Definition at line 78 of file abstract-gravityview-plugin-and-theme-hooks.php.

References maybe_add_hooks().

Member Function Documentation

add_hooks ( )
protected

Add filters for meta key and script/style handles, if defined.

Since
1.15.2
Returns
void

Definition at line 106 of file abstract-gravityview-plugin-and-theme-hooks.php.

Referenced by maybe_add_hooks().

maybe_add_hooks ( )
private

Check whether plugin or theme exists.

If so, add hooks. This is to reduce load time, since apply_filters() isn't free. If the class name or function name or constant exists for a plugin or theme, add hooks If the class/function/definition aren't speicifed add the hooks

Since
1.15.2
Returns
void

Definition at line 91 of file abstract-gravityview-plugin-and-theme-hooks.php.

References add_hooks().

Referenced by __construct().

merge_content_meta_keys (   $meta_keys = array(),
  $post_id = 0 
)

Merge plugin or theme meta keys that store shortcode data with existing keys to check.

Since
1.15.2
Parameters
array$handlesArray of meta keys to check for existence of shortcodes
int$post_idThe ID being checked by GravityView
Returns
array Meta key array, merged with existing meta keys

Definition at line 177 of file abstract-gravityview-plugin-and-theme-hooks.php.

merge_noconflict_scripts (   $handles)

Merge plugin or theme scripts with existing no-conflict scripts.

Since
1.15.2
Parameters
array$handlesArray of script handles, as registered with WordPress
Returns
array Handles, merged with existing scripts

Definition at line 162 of file abstract-gravityview-plugin-and-theme-hooks.php.

merge_noconflict_styles (   $handles)

Merge plugin or theme styles with existing no-conflict styles.

Since
1.15.2
Parameters
array$handlesArray of style handles, as registered with WordPress
Returns
array Handles, merged with existing styles

Definition at line 148 of file abstract-gravityview-plugin-and-theme-hooks.php.

merge_post_type_support (   $supports = array(),
  $is_hierarchical = false 
)

Merge plugin or theme post type support definitions with existing support values.

Since
1.15.2
Parameters
array$supportsArray of features associated with a functional area of the edit screen.
boolean$is_hierarchicalDo Views support parent/child relationships? See gravityview_is_hierarchical filter.
Returns
array Array of features associated with a functional area of the edit screen, merged with existing values

Definition at line 134 of file abstract-gravityview-plugin-and-theme-hooks.php.

Field Documentation

$class_name = false
protected

string Optional.

Class that should be exist in a plugin or theme. Used to check whether plugin is active.

Since
1.15.2

Definition at line 28 of file abstract-gravityview-plugin-and-theme-hooks.php.

$constant_name = false
protected

string Optional.

Constant that should be defined by plugin or theme. Used to check whether plugin is active.

Since
1.15.2

Definition at line 40 of file abstract-gravityview-plugin-and-theme-hooks.php.

$content_meta_keys = array()
protected

Define the keys to be parsed by the gravityview/data/parse/meta_keys hook.

See also
GravityView_View_Data::parse_post_meta
Since
1.15.2 array

Definition at line 48 of file abstract-gravityview-plugin-and-theme-hooks.php.

$function_name = false
protected

string Optional.

Function that should be exist in a plugin or theme. Used to check whether plugin is active.

Since
1.15.2

Definition at line 34 of file abstract-gravityview-plugin-and-theme-hooks.php.

$post_type_support = array()
protected

Define features in the admin editor used by the theme or plugin to be used when registering the GravityView post type.

See also
::get_endpoint_name
Since
1.15.2 array

Definition at line 72 of file abstract-gravityview-plugin-and-theme-hooks.php.

$script_handles = array()
protected

Define script handles used by the theme or plugin to be parsed by the gravityview/data/parse/meta_keys hook.

See also
GravityView_Admin::remove_conflicts
Since
1.15.2 array

Definition at line 56 of file abstract-gravityview-plugin-and-theme-hooks.php.

$style_handles = array()
protected

Define style handles used by the theme or plugin to be parsed by the gravityview/data/parse/meta_keys hook.

See also
GravityView_Admin::remove_conflicts
Since
1.15.2 array

Definition at line 64 of file abstract-gravityview-plugin-and-theme-hooks.php.


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