GravityView
2.17
The best, easiest way to display Gravity Forms entries on your website.
includes
plugin-and-theme-hooks
class-gravityview-theme-hooks-woothemes.php
Go to the documentation of this file.
1
<?php
2
/**
3
* Add WooThemes Framework compatibility to GravityView, including registering scripts and styles to GravityView no-conflict list
4
*
5
* @file class-gravityview-theme-hooks-woothemes.php
6
* @package GravityView
7
* @license GPL2+
8
* @author GravityView <
[email protected]
>
9
* @link http://gravityview.co
10
* @copyright Copyright 2015, Katz Web Services, Inc.
11
*
12
* @since 1.15.2
13
*/
14
15
/**
16
* @inheritDoc
17
*/
18
class
GravityView_Theme_Hooks_WooThemes
extends
GravityView_Plugin_and_Theme_Hooks
{
19
20
/**
21
* @inheritDoc
22
* @since 1.15.2
23
*/
24
protected
$script_handles
= array(
25
'woo-shortcodes'
,
26
'woo-custom-fields'
,
27
'woo-medialibrary-uploader'
,
28
'jquery-masked-input'
,
29
'woo-upload'
,
30
'woo-datepicker'
,
31
'woo-colourpicker'
,
32
'woo-typography'
,
33
'woo-masked-input'
,
34
'woo-chosen'
,
35
'woo-chosen-rtl'
,
36
'woo-chosen-loader'
,
37
'woo-image-selector'
,
38
'woo-range-selector'
,
39
);
40
41
/**
42
* @inheritDoc
43
* @since 1.15.2
44
*/
45
protected
$style_handles
= array(
46
'woo-menu'
,
47
'wf-admin'
,
48
'woothemes-fields'
,
49
'woo-fields'
,
50
'woo-chosen'
,
51
'woothemes-chosen'
,
52
);
53
54
/**
55
* @inheritDoc
56
* @since 1.15.2
57
*/
58
protected
$function_name
=
'woo_version'
;
59
60
/**
61
* @inheritDoc
62
* @since 1.15.2
63
*/
64
function
add_hooks
() {
65
66
parent::add_hooks();
67
68
add_action(
'admin_menu'
, array( $this,
'remove_meta_box'
), 11 );
69
}
70
71
/**
72
* Remove the WooThemes metabox on new page
73
* @since 1.15.2
74
*/
75
function
remove_meta_box
() {
76
global $pagenow;
77
78
$gv_page =
gravityview
()->request->is_admin(
''
,
'single'
);
79
80
// New View or Edit View page
81
if
( $gv_page && $pagenow ===
'post-new.php'
) {
82
remove_meta_box
(
'woothemes-settings'
,
'gravityview'
,
'normal'
);
83
}
84
}
85
86
}
87
88
new
GravityView_Theme_Hooks_WooThemes
;
GravityView_Theme_Hooks_WooThemes
Definition:
class-gravityview-theme-hooks-woothemes.php:18
GravityView_Theme_Hooks_WooThemes\$style_handles
$style_handles
Definition:
class-gravityview-theme-hooks-woothemes.php:45
GravityView_Theme_Hooks_WooThemes\$function_name
$function_name
Definition:
class-gravityview-theme-hooks-woothemes.php:58
GravityView_Theme_Hooks_WooThemes\remove_meta_box
remove_meta_box()
Remove the WooThemes metabox on new page.
Definition:
class-gravityview-theme-hooks-woothemes.php:75
GravityView_Theme_Hooks_WooThemes\add_hooks
add_hooks()
Definition:
class-gravityview-theme-hooks-woothemes.php:64
GravityView_Theme_Hooks_WooThemes
new GravityView_Theme_Hooks_WooThemes
Definition:
class-gravityview-theme-hooks-woothemes.php:88
GravityView_Theme_Hooks_WooThemes\$script_handles
$script_handles
Definition:
class-gravityview-theme-hooks-woothemes.php:24
gravityview
gravityview()
The main GravityView wrapper function.
Definition:
future/gravityview.php:26
GravityView_Plugin_and_Theme_Hooks
Abstract class that makes it easy for plugins and themes to register no-conflict scripts and styles...
Definition:
abstract-gravityview-plugin-and-theme-hooks.php:22