PluginProbe
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress / trunk
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress vtrunk
4.12.0 4.10.0 4.9.0 4.8.1 trunk 1.0 1.1 1.12.1 1.2.3 1.2.4 1.2.5 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.4.0 1.4.1 1.4.2 All 171 releases
custom-facebook-feed / inc / Builder / Controls / CFF_Controls_Base.php
CFF_Controls_Base.php
153 lines 6.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Customizer Builder Control Base
5 *
6 * @since 4.0
7 */
8
9 namespace CustomFacebookFeed\Builder\Controls;
10
11 if (!defined('ABSPATH')) {
12 exit;
13 }
14
15 abstract class CFF_Controls_Base
16 {
17 /**
18 * Get control type.
19 *
20 * Getting the Control Type
21 *
22 * @since 4.0
23 * @access public
24 *
25 * @return string
26 */
27 public function get_type()
28 {
29 return '';
30 }
31
32 /**
33 * Get control info.
34 *
35 * Getting the Control information []
36 *
37 * @since 4.0
38 * @access public
39 *
40 * @return array
41 */
42 public function get_info()
43 {
44 return [
45 'id' => '',
46 'type' => '',
47 'modelname' => '',
48 'layout' => 'full',
49 'reverse' => 'false',
50 'default' => '',
51 'seperator' => 'none',
52 'heading' => '',
53 'description' => '',
54 'tooltip' => '',
55 ];
56 }
57
58 /**
59 * Control Output
60 *
61 * @since 4.0
62 * @access public
63 *
64 * @return HTML
65 */
66 public function get_control_output($controlEditingTypeModel)
67 {
68 }
69
70 /**
71 * Getting Editing Control Type
72 *
73 * @since 1.0.0
74 * @access public
75 *
76 * @return String
77 */
78 public function get_control_edit_type($editingType)
79 {
80 switch ($editingType) {
81 case 'settings':
82 return 'customizerFeedData.settings';
83 break;
84 }
85 }
86
87 /**
88 * Get Control HTML.
89 *
90 * @since 4.0
91 * @access public
92 *
93 * @return HTML
94 */
95 public function print_control_wrapper($editingType)
96 {
97 $control_type = $this->get_type();
98 $controlEditingTypeModel = $this->get_control_edit_type($editingType);
99 ?>
100
101 <div class="sb-control-elem-ctn cff-fb-fs" v-if="control.type == '<?php echo $control_type ?>'"
102 v-show="isControlShown(control)"
103 :data-child="control.child ? 'true' : false"
104 :data-separator="control.separator != undefined ? control.separator : 'none'"
105 :data-type="control.type" :data-layout="control.layout == undefined ? 'block' : 'half'"
106 :data-reverse="control.reverse != undefined ? 'true' : 'false'" :data-stacked="control.stacked ? 'true' : 'false'"
107 :data-heading="control.strongHeading != undefined ? '' : 'strong'"
108 :data-disabled="control.disabledInput != undefined ? isControlShown(control) : false"
109 :data-switcher-top="control.switcherTop != undefined ? 'true' : false"
110 >
111
112 <div class="sb-control-elem-overlay"
113 :role="control.checkExtensionPopup != undefined && !checkExtensionActive(control.checkExtensionPopup) ? 'button' : null"
114 :tabindex="control.checkExtensionPopup != undefined && !checkExtensionActive(control.checkExtensionPopup) ? 0 : null"
115 :aria-label="control.checkExtensionPopup != undefined && !checkExtensionActive(control.checkExtensionPopup) ? (control.heading + ' (' + genericText.learnMore + ')') : null"
116 v-show="control.condition != undefined || control.checkExtension != undefined || control.checkExtensionDimmed != undefined ? !checkControlCondition(control.condition, control.checkExtension, control.checkExtensionDimmed) : false"
117 @click.prevent.default="control.checkExtensionPopup != undefined && !checkExtensionActive(control.checkExtensionPopup) ? viewsActive.extensionsPopupElement = control.checkExtensionPopup : false"
118 @keydown.enter.prevent.default="control.checkExtensionPopup != undefined && !checkExtensionActive(control.checkExtensionPopup) ? viewsActive.extensionsPopupElement = control.checkExtensionPopup : false"
119 @keydown.space.prevent.default="control.checkExtensionPopup != undefined && !checkExtensionActive(control.checkExtensionPopup) ? viewsActive.extensionsPopupElement = control.checkExtensionPopup : false"
120 :class="control.checkExtensionPopup != undefined && !checkExtensionActive(control.checkExtensionPopup) ? 'sb-cursor-pointer' : ''"
121 >
122 </div>
123
124 <div class="sb-control-elem-label" v-if="(control.heading == undefined && control.description == undefined) ? false : true && control.type != 'customview'">
125 <div class="sb-control-elem-label-title cff-fb-fs">
126 <div v-if="control.icon != undefined" class="sb-control-elem-icon" v-html="svgIcons[control.icon]"></div>
127 <div class="sb-control-elem-heading sb-small-p sb-dark-text" :data-underline="control.underline"
128 :role="control.enableViewAction != undefined && control.enableViewAction != false ? 'button' : (control.type == 'heading' ? 'heading' : null)"
129 :aria-level="control.enableViewAction != undefined && control.enableViewAction != false ? null : (control.type == 'heading' ? 3 : null)"
130 :tabindex="control.enableViewAction != undefined && control.enableViewAction != false ? 0 : null"
131 :class="control.enableViewAction != undefined && control.enableViewAction != false ? 'sb-cursor-pointer' : ''"
132 @click.prevent.default="control.enableViewAction != undefined && control.enableViewAction != false ? switchNestedSection(control.enableViewAction, null ) : false"
133 @keydown.enter.prevent.default="control.enableViewAction != undefined && control.enableViewAction != false ? switchNestedSection(control.enableViewAction, null ) : false"
134 @keydown.space.prevent.default="control.enableViewAction != undefined && control.enableViewAction != false ? switchNestedSection(control.enableViewAction, null ) : false">
135 <span v-html="control.heading"></span>
136 <span v-if="control.proLabel != undefined && control.proLabel" class="sb-breadcrumb-pro-label">PRO</span>
137 </div>
138 <div class="sb-control-elem-tltp" v-if="control.tooltip != undefined" @mouseover.prevent.default="toggleElementTooltip(control.tooltip, 'show', control.tooltipAlign ? control.tooltipAlign : 'center' )" @mouseleave.prevent.default="toggleElementTooltip('', 'hide')">
139 <div class="sb-control-elem-tltp-icon" v-html="svgIcons['info']"></div>
140 </div>
141 </div>
142 <div class="sb-control-elem-description">
143 <span v-html="control.description"></span> <a href="#" v-if="control.checkExtensionPopupLeranMore != undefined" @click.prevent.default="viewsActive.extensionsPopupElement = control.checkExtensionPopupLeranMore">{{genericText.learnMore}}</a>
144 </div>
145 </div>
146 <div class="sb-control-elem-output"
147 :inert="(control.condition != undefined || control.checkExtension != undefined || control.checkExtensionDimmed != undefined ? !checkControlCondition(control.condition, control.checkExtension, control.checkExtensionDimmed) : false) ? true : null">
148 <?php $this->get_control_output($controlEditingTypeModel); ?>
149 </div>
150 </div>
151 <?php
152 }
153 }