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/_public.php

    r3731 r3874  
    1515 
    1616# Simple menu template functions 
    17 $core->tpl->addValue('SimpleMenu', array('tplSimpleMenu', 'simpleMenu')); 
     17$core->tpl->addValue('SimpleMenu', ['tplSimpleMenu', 'simpleMenu']); 
    1818 
    1919class tplSimpleMenu 
     
    4848        global $core, $_ctx; 
    4949 
    50         $descr_type = array(0 => 'span', 1 => 'title', 2 => 'both', 3 => 'none'); 
     50        $descr_type = [0 => 'span', 1 => 'title', 2 => 'both', 3 => 'none']; 
    5151 
    5252        if (!(boolean) $core->blog->settings->system->simpleMenu_active) { 
     
    145145                $label = html::escapeHTML(__($m['label'])); 
    146146 
    147                 $item = new ArrayObject(array( 
     147                $item = new ArrayObject([ 
    148148                    'url'    => $href,   // URL 
    149149                    'label'  => $label,  // <a> link label 
     
    152152                    'active' => $active, // status (true/false) 
    153153                    'class'  => ''      // additional <li> class (optional) 
    154                 )); 
     154                ]); 
    155155 
    156156                # --BEHAVIOR-- publicSimpleMenuItem 
Note: See TracChangeset for help on using the changeset viewer.

Sites map