88 add_action(
'wp_loaded', array( $this,
'_wp_loaded' ) );
111 $class_exists = $this->class_name && class_exists( $this->class_name );
112 $function_exists = $this->function_name && function_exists( $this->function_name );
113 $constant_defined = $this->constant_name && defined(
"{$this->constant_name}");
115 if( $class_exists || $function_exists || $constant_defined ) {
127 if( $this->meta_keys ) {
128 add_filter(
'gravityview/data/parse/meta_keys', array( $this,
'merge_meta_keys' ), 10, 2 );
131 if( $this->content_meta_keys ) {
132 add_filter(
'gravityview/view_collection/from_post/meta_keys', array( $this,
'merge_content_meta_keys' ), 10, 3 );
135 if( $this->script_handles ) {
136 add_filter(
'gravityview_noconflict_scripts', array( $this,
'merge_noconflict_scripts' ) );
139 if( $this->style_handles ) {
140 add_filter(
'gravityview_noconflict_styles', array( $this,
'merge_noconflict_styles' ) );
143 if( $this->post_type_support ) {
144 add_filter(
'gravityview_post_type_support', array( $this,
'merge_post_type_support' ), 10, 2 );
159 $supports = array_merge( $this->post_type_support, $supports );
173 $handles = array_merge( $this->style_handles, $handles );
187 $handles = array_merge( $this->script_handles, $handles );
204 return array_merge( $this->meta_keys,
$meta_keys );
218 return array_merge( $this->content_meta_keys,
$meta_keys );
$script_handles
Define script handles used by the theme or plugin to be added to allowed no-conflict scripts...
$class_name
string Optional.
merge_noconflict_styles( $handles)
Merge plugin or theme styles with existing no-conflict styles.
merge_meta_keys( $meta_keys=array(), $post_id=0)
Merge plugin or theme meta keys that store shortcode data with existing keys to check.
$content_meta_keys
Define the keys to be parsed by the gravityview/view_collection/from_post/meta_keys hook...
$constant_name
string Optional.
$function_name
string Optional.
merge_noconflict_scripts( $handles)
Merge plugin or theme scripts with existing no-conflict scripts.
__construct()
GravityView_Theme_Support constructor.
$style_handles
Define style handles used by the theme or plugin to be added to allowed no-conflict styles...
$post_type_support
Define features in the admin editor used by the theme or plugin to be used when registering the Gravi...
add_hooks()
Add filters for meta key and script/style handles, if defined.
$meta_keys
Define the keys to be parsed by the gravityview/data/parse/meta_keys hook.
merge_content_meta_keys( $meta_keys=array(), $post=null, & $views=null)
Merge plugin or theme meta keys that store shortcode data with existing keys to check.
merge_post_type_support( $supports=array(), $is_hierarchical=false)
Merge plugin or theme post type support definitions with existing support values. ...
Abstract class that makes it easy for plugins and themes to register no-conflict scripts and styles...
_wp_loaded()
Fired when all themes and plugins have been loaded.
maybe_add_hooks()
Check whether plugin or theme exists.