Changeset 3874:ab8368569446 for plugins/widgets/index.php
- Timestamp:
- 09/14/18 12:16:17 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/widgets/index.php
r3826 r3874 28 28 } 29 29 30 $append_combo = array(30 $append_combo = [ 31 31 '-' => 0, 32 32 __('navigation') => 'nav', 33 33 __('extra') => 'extra', 34 34 __('custom') => 'custom' 35 );35 ]; 36 36 37 37 function literalNullString($v) … … 46 46 if (!empty($_POST['append']) && is_array($_POST['addw'])) { 47 47 # Filter selection 48 $addw = array();48 $addw = []; 49 49 foreach ($_POST['addw'] as $k => $v) { 50 50 if (($v == 'extra' || $v == 'nav' || $v == 'custom') && $__widgets->{$k} !== null) { … … 144 144 if (!empty($_POST['wup']) || $removing || $move) { 145 145 if (!isset($_POST['w']) || !is_array($_POST['w'])) { 146 $_POST['w'] = array();146 $_POST['w'] = []; 147 147 } 148 148 … … 160 160 161 161 if (!isset($_POST['w']['nav'])) { 162 $_POST['w']['nav'] = array();162 $_POST['w']['nav'] = []; 163 163 } 164 164 if (!isset($_POST['w']['extra'])) { 165 $_POST['w']['extra'] = array();165 $_POST['w']['extra'] = []; 166 166 } 167 167 if (!isset($_POST['w']['custom'])) { 168 $_POST['w']['custom'] = array();168 $_POST['w']['custom'] = []; 169 169 } 170 170 … … 214 214 echo dcPage::jsLoad(dcPage::getPF('widgets/js/dragdrop.js')); 215 215 } 216 echo dcPage::jsVars( array('dotclear.msg.confirm_widgets_reset' => __('Are you sure you want to reset sidebars?')));216 echo dcPage::jsVars(['dotclear.msg.confirm_widgets_reset' => __('Are you sure you want to reset sidebars?')]); 217 217 218 218 $widget_editor = $core->auth->getOption('editor'); … … 223 223 } 224 224 if ($rte_flag) { 225 echo dcPage::jsVars( array('dotclear.widget_noeditor' => 0));225 echo dcPage::jsVars(['dotclear.widget_noeditor' => 0]); 226 226 echo $core->callBehavior('adminPostEditor', $widget_editor['xhtml'], 'widget', 227 array('#sidebarsWidgets textarea:not(.noeditor)'), 'xhtml');227 ['#sidebarsWidgets textarea:not(.noeditor)'], 'xhtml'); 228 228 } else { 229 echo dcPage::jsVars( array('dotclear.widget_noeditor' => 1));229 echo dcPage::jsVars(['dotclear.widget_noeditor' => 1]); 230 230 } 231 231 echo (dcPage::jsConfirmClose('sidebarsWidgets')); … … 235 235 <?php 236 236 echo dcPage::breadcrumb( 237 array(237 [ 238 238 html::escapeHTML($core->blog->name) => '', 239 239 __('Widgets') => '' 240 )) .240 ]) . 241 241 dcPage::notices(); 242 242 … … 251 251 foreach ($__widgets->elements(true) as $w) { 252 252 echo 253 '<li>' . form::hidden( array('w[void][0][id]'), html::escapeHTML($w->id())) .254 '<p class="widget-name">' . form::number( array('w[void][0][order]'), array(253 '<li>' . form::hidden(['w[void][0][id]'], html::escapeHTML($w->id())) . 254 '<p class="widget-name">' . form::number(['w[void][0][order]'], [ 255 255 'default' => 0, 256 256 'class' => 'hide', 257 257 'extra_html' => 'title="' . __('order') . '"' 258 )) .258 ]) . 259 259 ' ' . $w->name() . 260 260 ($w->desc() != '' ? ' <span class="form-note">' . __($w->desc()) . '</span>' : '') . '</p>' . 261 261 '<p class="manual-move remove-if-drag"><label class="classic">' . __('Append to:') . '</label> ' . 262 form::combo( array('addw[' . $w->id() . ']'), $append_combo) .262 form::combo(['addw[' . $w->id() . ']'], $append_combo) . 263 263 '<input type="submit" name="append[' . $w->id() . ']" value="' . __('Add') . '" /></p>' . 264 264 '<div class="widgetSettings hidden-if-drag">' . $w->formSettings('w[void][0]', $j) . '</div>' . … … 365 365 366 366 $res .= 367 '<li>' . form::hidden( array($iname . '[id]'), html::escapeHTML($w->id())) .368 '<p class="widget-name">' . form::number( array($iname . '[order]'), array(367 '<li>' . form::hidden([$iname . '[id]'], html::escapeHTML($w->id())) . 368 '<p class="widget-name">' . form::number([$iname . '[order]'], [ 369 369 'default' => $i, 370 370 'class' => 'hidden', 371 371 'extra_html' => 'title="' . __('order') . '"' 372 )) .372 ]) . 373 373 ' ' . $w->name() . 374 374 ($w->desc() != '' ? ' <span class="form-note">' . __($w->desc()) . '</span>' : '') .
Note: See TracChangeset
for help on using the changeset viewer.