Dotclear


Ignore:
Timestamp:
09/14/18 12:16:17 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

short notation for array (array() → [])

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/simpleMenu/_widgets.php

    r3731 r3874  
    1212if (!defined('DC_RC_PATH')) {return;} 
    1313 
    14 $core->addBehavior('initWidgets', array('simpleMenuWidgets', 'initWidgets')); 
     14$core->addBehavior('initWidgets', ['simpleMenuWidgets', 'initWidgets']); 
    1515 
    1616class simpleMenuWidgets 
     
    1818    public static function initWidgets($w) 
    1919    { 
    20         $w->create('simplemenu', __('Simple menu'), array('tplSimpleMenu', 'simpleMenuWidget'), null, 'List of simple menu items'); 
     20        $w->create('simplemenu', __('Simple menu'), ['tplSimpleMenu', 'simpleMenuWidget'], null, 'List of simple menu items'); 
    2121        $w->simplemenu->setting('title', __('Title (optional)') . ' :', __('Menu')); 
    2222        $w->simplemenu->setting('description', __('Item description'), 0, 'combo', 
    23             array( 
     23            [ 
    2424                __('Displayed in link')                   => 0, // span 
    2525                __('Used as link title')                  => 1, // title 
    2626                __('Displayed in link and used as title') => 2, // both 
    2727                __('Not displayed nor used')              => 3 // none 
    28             ) 
     28            ] 
    2929        ); 
    3030        $w->simplemenu->setting('homeonly', __('Display on:'), 0, 'combo', 
    31             array( 
     31            [ 
    3232                __('All pages')           => 0, 
    3333                __('Home page only')      => 1, 
    3434                __('Except on home page') => 2 
    35             ) 
     35            ] 
    3636        ); 
    3737        $w->simplemenu->setting('content_only', __('Content only'), 0, 'check'); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map