PluginProbe
QuadMenu – Mega Menu / 1.8.9
QuadMenu – Mega Menu v1.8.9
3.3.8 3.3.7 3.3.6 trunk 1.8.4 1.8.5 1.8.7 1.8.8 1.8.9 1.9.0 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 88 releases
quadmenu / lib / ReduxCore / inc / fields / divide / field_divide.php

field_divide.php in QuadMenu – Mega Menu 1.8.9, at lib/ReduxCore/inc/fields/divide/field_divide.php

85 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Redux Framework is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * any later version.
8 * Redux Framework is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with Redux Framework. If not, see <http://www.gnu.org/licenses/>.
14 *
15 * @package ReduxFramework
16 * @subpackage Field_Divide
17 * @author Daniel J Griffiths (Ghost1227)
18 * @author Dovy Paukstys
19 * @version 3.0.0
20 */
21
22 // Exit if accessed directly
23 if ( !defined ( 'ABSPATH' ) ) {
24 exit;
25 }
26
27 // Don't duplicate me!
28 if ( !class_exists ( 'ReduxFramework_divide' ) ) {
29
30 /**
31 * Main ReduxFramework_divide class
32 *
33 * @since 1.0.0
34 */
35 class ReduxFramework_divide {
36
37 /**
38 * Field Constructor.
39 * Required - must call the parent constructor, then assign field and value to vars, and obviously call the render field function
40 *
41 * @since 1.0.0
42 * @access public
43 * @return void
44 */
45 function __construct ( $field = array(), $value = '', $parent ) {
46 $this->parent = $parent;
47 $this->field = $field;
48 $this->value = $value;
49 }
50
51 /**
52 * Field Render Function.
53 * Takes the vars and outputs the HTML for the field in the settings
54 *
55 * @since 1.0.0
56 * @access public
57 * @return void
58 */
59 public function render () {
60 echo '</td></tr></table>';
61 echo '<div data-id="' . $this->field[ 'id' ] . '" id="divide-' . $this->field[ 'id' ] . '" class="divide ' . $this->field[ 'class' ] . '"><div class="inner"><span>&nbsp;</span></div></div>';
62 echo '<table class="form-table no-border"><tbody><tr><th></th><td>';
63 }
64
65 /**
66 * Enqueue Function.
67 * If this field requires any scripts, or css define this function and register/enqueue the scripts/css
68 *
69 * @since 1.0.0
70 * @access public
71 * @return void
72 */
73 public function enqueue() {
74 if ($this->parent->args['dev_mode']) {
75 wp_enqueue_style(
76 'redux-field-divide',
77 ReduxFramework::$_url . 'inc/fields/divide/field_divide.css',
78 array(),
79 time(),
80 'all'
81 );
82 }
83 }
84 }
85 }