PluginProbe
MaxButtons – Create buttons / 6.28
MaxButtons – Create buttons v6.28
6.23 6.24 6.25 6.26 6.26.1 6.27 6.28 6.3 6.4 6.5 6.6 6.7 6.8 6.9 7.0 7.1 7.1.1 7.1.2 7.1.3 7.10 7.11 7.13 7.13.1 7.13.2 7.13.3 All 100 releases
← All changes | blocks/border.php +51 -26 7.136.28 View file →
@@ -42,8 +42,15 @@
42 42
43 43 );
44 44
45 45
46 + function __construct()
47 + {
48 + parent::__construct();
49 + $this->fields = apply_filters($this->blockname. "-block-fields",$this->fields);
50 + $this->data[$this->blockname] = array(); //empty init
51 + }
52 +
46 53 public function map_fields($map)
47 54 {
48 55 $map = parent::map_fields($map);
49 56 $map["box_shadow_offset_left"]["func"] = "updateBoxShadow";
@@ -58,23 +65,8 @@
58 65
59 66 return $map;
60 67 }
61 68
62 -
63 - public function parse_css($css, $mode = 'normal')
64 - {
65 - $css = parent::parse_css($css);
66 - $data = $this->data[$this->blockname];
67 -
68 - $border_width = maxBlocks::getValue('border_width');
69 - if ( intval($border_width) == 0) // if no border, then don't output other border properties.
70 - {
71 - unset($css['maxbutton']['normal']['border-style']);
72 - }
73 -
74 - return $css;
75 - }
76 -
77 69 public function admin_fields()
78 70 {
79 71
80 72 $data = $this->data[$this->blockname];
@@ -101,14 +93,15 @@
101 93 $color_copy_move = __("Copy Color to other field", "maxbuttons");
102 94
103 95 $admin = MB()->getClass('admin');
104 96
105 - $start_block = new maxField('block_start');
106 - $start_block->name = __('border', 'maxbuttons');
107 - $start_block->label = __('Border', 'maxbuttons');
108 - $admin->addField($start_block);
97 +?>
98 + <div class="option-container mb_tab">
99 + <div class="title"><?php _e('Border', 'maxbuttons') ?></div>
100 + <div class="inside">
109 101
110 102
103 + <?php
111 104 // Spacer
112 105 $fspacer = new maxField('spacer');
113 106 $fspacer->label = __('Radius','maxbuttons');
114 107 $fspacer->name = 'radius';
@@ -117,8 +110,10 @@
117 110 $admin->addField($fspacer, 'start');
118 111
119 112 // Radius left top
120 113 $radius_tleft = new maxField('number');
114 + //$radius_tleft->label = __('Top Left', 'maxbuttons');
115 + //$radius_tleft->label = '<span class="dashicons dashicons-arrow-left-alt2 rotate-right"></span>';
121 116 $radius_tleft->value = maxUtils::strip_px(maxBlocks::getValue('radius_top_left'));
122 117 $radius_tleft->id = 'radius_top_left';
123 118 $radius_tleft->name = $radius_tleft->id;
124 119 $radius_tleft->min = 0;
@@ -125,10 +120,14 @@
125 120 $radius_tleft->inputclass = 'tiny';
126 121 $radius_tleft->publish = false;
127 122 $rtl = $radius_tleft->output('');
128 123
124 +
125 +
129 126 // Radius right top
130 127 $radius_tright = new maxField('number');
128 + //$radius_tright->label = __('Top Right', 'maxbuttons');
129 + //$radius_tright->label = '<span class="dashicons dashicons-arrow-right-alt2 rotate-left"></span>';
131 130 $radius_tright->value = maxUtils::strip_px(maxBlocks::getValue('radius_top_right'));
132 131 $radius_tright->id = 'radius_top_right';
133 132 $radius_tright->name = $radius_tright->id;
134 133 $radius_tright->min = 0;
@@ -138,8 +137,10 @@
138 137
139 138
140 139 // Radius bottom left
141 140 $radius_bleft = new maxField('number');
141 + //$radius_bleft->label = __('Bottom Left', 'maxbuttons');
142 + //$radius_bleft->label = '<span class="dashicons dashicons-arrow-left-alt2 rotate-left"></span>';
142 143 $radius_bleft->value = maxUtils::strip_px(maxBlocks::getValue('radius_bottom_left'));
143 144 $radius_bleft->id = 'radius_bottom_left';
144 145 $radius_bleft->name = $radius_bleft->id;
145 146 $radius_bleft->min = 0;
@@ -148,9 +149,10 @@
148 149 $rbl = $radius_bleft->output('');
149 150
150 151 // Radius bottom right
151 152 $radius_bright = new maxField('number');
152 -
153 + //$radius_bright->label = __('Bottom Right', 'maxbuttons');
154 + //$radius_bright->label = '<span class="dashicons dashicons-arrow-right-alt2 rotate-right"></span>';
153 155 $radius_bright->value = maxUtils::strip_px(maxBlocks::getValue('radius_bottom_right'));
154 156 $radius_bright->id = 'radius_bottom_right';
155 157 $radius_bright->name = $radius_bright->id;
156 158 $radius_bright->min = 0;
@@ -177,8 +179,10 @@
177 179 $radius->label_bl = __('Bottom Left','maxbuttons');
178 180 $radius->radius_br = $rbr;
179 181 $radius->label_br = __('Bottom Right','maxbuttons');
180 182 $radius->lock = $lock;
183 + //$radius->output('','end');
184 +
181 185 $admin->addField($radius, '', 'end');
182 186
183 187 // Border style
184 188 $bstyle = new maxField('generic');
@@ -187,8 +191,10 @@
187 191 $bstyle->id = $bstyle->name;
188 192 $bstyle->value= maxBlocks::getValue('border_style');
189 193 $bstyle->setDefault(maxBlocks::getDefault('border_style'));
190 194 $bstyle->content = maxUtils::selectify($bstyle->name, $maxbuttons_border_styles, $bstyle->value);
195 + //$bstyle->output('start', 'end');
196 +
191 197 $admin->addField($bstyle, 'start', 'end');
192 198
193 199 // Border width
194 200 $bwidth = new maxField('number');
@@ -196,10 +202,11 @@
196 202 $bwidth->name = 'border_width';
197 203 $bwidth->id = $bwidth->name;
198 204 $bwidth->value = maxUtils::strip_px( maxBlocks::getValue('border_width') );
199 205 $bwidth->min = 0;
200 - $bwidth->after_input = __('px', 'maxbuttons');
201 206 $bwidth->inputclass = 'tiny';
207 + //$bwidth->output('start','end');
208 +
202 209 $admin->addField($bwidth, 'start', 'end');
203 210
204 211 // Border Color
205 212 $bcolor = new maxField('color');
@@ -211,8 +218,10 @@
211 218 $bcolor->bindto = 'border_color_hover';
212 219 $bcolor->copypos = 'right';
213 220 $bcolor->left_title = $color_copy_self;
214 221 $bcolor->right_title = $color_copy_move;
222 + //$bcolor->output('start');
223 +
215 224 $admin->addField($bcolor ,'start');
216 225
217 226 // Border Color Hover
218 227 $bcolor_hover = new maxField('color');
@@ -224,8 +233,10 @@
224 233 $bcolor_hover->bindto = 'border_color';
225 234 $bcolor_hover->copypos = 'left';
226 235 $bcolor_hover->left_title = $color_copy_move;
227 236 $bcolor_hover->right_title = $color_copy_self;
237 + // $bcolor_hover->output('','end');
238 +
228 239 $admin->addField($bcolor_hover, '', 'end');
229 240
230 241 // Shadow offset left
231 242 $bshadow = new maxField('number');
@@ -233,8 +244,10 @@
233 244 $bshadow->name = 'box_shadow_offset_left';
234 245 $bshadow->id = $bshadow->name;
235 246 $bshadow->value = maxUtils::strip_px( maxBlocks::getValue('box_shadow_offset_left') );
236 247 $bshadow->inputclass = 'tiny';
248 + //$bshadow->output('start');
249 +
237 250 $admin->addField($bshadow, 'start');
238 251
239 252 // Shadow offset top
240 253 $bshadow = new maxField('number');
@@ -242,8 +255,10 @@
242 255 $bshadow->name = 'box_shadow_offset_top';
243 256 $bshadow->id = $bshadow->name;
244 257 $bshadow->value = maxUtils::strip_px( maxBlocks::getValue('box_shadow_offset_top') );
245 258 $bshadow->inputclass = 'tiny';
259 + // $bshadow->output('','end');
260 +
246 261 $admin->addField($bshadow, '', 'end');
247 262
248 263 // Shadow width
249 264 $bshadow = new maxField('number');
@@ -251,9 +266,10 @@
251 266 $bshadow->name = 'box_shadow_width';
252 267 $bshadow->id = $bshadow->name;
253 268 $bshadow->value = maxUtils::strip_px( maxBlocks::getValue('box_shadow_width') );
254 269 $bshadow->inputclass = 'tiny';
255 - $bshadow->min = 0;
270 + //$bshadow->output('start','');
271 +
256 272 $admin->addField($bshadow, 'start', '');
257 273
258 274 $bspread = new maxField('number');
259 275 $bspread->label = __('Shadow Spread', 'maxbuttons');
@@ -260,8 +276,10 @@
260 276 $bspread->value = maxUtils::strip_px(maxBlocks::getValue('box_shadow_spread'));
261 277 $bspread->id = 'box_shadow_spread';
262 278 $bspread->name = $bspread->id;
263 279 $bspread->inputclass = 'tiny';
280 + //$bspread->output('','end');
281 +
264 282 $admin->addField($bspread, '', 'end');
265 283
266 284 // Border Shadow Color
267 285 $scolor = new maxField('color');
@@ -273,8 +291,10 @@
273 291 $scolor->bindto = 'box_shadow_color_hover';
274 292 $scolor->copypos = 'right';
275 293 $scolor->left_title = $color_copy_self;
276 294 $scolor->right_title = $color_copy_move;
295 + //$scolor->output('start');
296 +
277 297 $admin->addField($scolor, 'start');
278 298
279 299 // Border Shadow Color Hover
280 300 $scolor_hover = new maxField('color');
@@ -286,15 +306,20 @@
286 306 $scolor_hover->bindto = 'box_shadow_color';
287 307 $scolor_hover->copypos = 'left';
288 308 $scolor_hover->left_title = $color_copy_self;
289 309 $scolor_hover->right_title = $color_copy_move;
310 + //$scolor_hover->output('','end');
311 +
290 312 $admin->addField($scolor_hover, '','end');
291 313
292 - $this->sidebar();
293 - $endblock = new maxField('block_end');
294 - $admin->addField($endblock);
314 + $admin->display_fields();
295 315
296 - } // admin fields
316 + ?>
317 +
318 + </div>
319 + </div>
320 +<?php
321 + } // admin fields
297 322
298 323 } // class
299 324
300 325 ?>