GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
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  */
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 
remove_meta_box()
Remove the WooThemes metabox on new page.
gravityview()
The main GravityView wrapper function.
Abstract class that makes it easy for plugins and themes to register no-conflict scripts and styles...