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

    r3731 r3874  
    1717 
    1818# Behaviors 
    19 $core->addBehavior('publicHeadContent', array(__NAMESPACE__ . '\tplDuctileTheme', 'publicHeadContent')); 
    20 $core->addBehavior('publicInsideFooter', array(__NAMESPACE__ . '\tplDuctileTheme', 'publicInsideFooter')); 
     19$core->addBehavior('publicHeadContent', [__NAMESPACE__ . '\tplDuctileTheme', 'publicHeadContent']); 
     20$core->addBehavior('publicInsideFooter', [__NAMESPACE__ . '\tplDuctileTheme', 'publicInsideFooter']); 
    2121 
    2222# Templates 
    23 $core->tpl->addValue('ductileEntriesList', array(__NAMESPACE__ . '\tplDuctileTheme', 'ductileEntriesList')); 
    24 $core->tpl->addBlock('EntryIfContentIsCut', array(__NAMESPACE__ . '\tplDuctileTheme', 'EntryIfContentIsCut')); 
    25 $core->tpl->addValue('ductileNbEntryPerPage', array(__NAMESPACE__ . '\tplDuctileTheme', 'ductileNbEntryPerPage')); 
    26 $core->tpl->addValue('ductileLogoSrc', array(__NAMESPACE__ . '\tplDuctileTheme', 'ductileLogoSrc')); 
    27 $core->tpl->addBlock('IfPreviewIsNotMandatory', array(__NAMESPACE__ . '\tplDuctileTheme', 'IfPreviewIsNotMandatory')); 
     23$core->tpl->addValue('ductileEntriesList', [__NAMESPACE__ . '\tplDuctileTheme', 'ductileEntriesList']); 
     24$core->tpl->addBlock('EntryIfContentIsCut', [__NAMESPACE__ . '\tplDuctileTheme', 'EntryIfContentIsCut']); 
     25$core->tpl->addValue('ductileNbEntryPerPage', [__NAMESPACE__ . '\tplDuctileTheme', 'ductileNbEntryPerPage']); 
     26$core->tpl->addValue('ductileLogoSrc', [__NAMESPACE__ . '\tplDuctileTheme', 'ductileLogoSrc']); 
     27$core->tpl->addBlock('IfPreviewIsNotMandatory', [__NAMESPACE__ . '\tplDuctileTheme', 'IfPreviewIsNotMandatory']); 
    2828 
    2929class tplDuctileTheme 
     
    109109 
    110110        $tpl_path   = dirname(__FILE__) . '/tpl/'; 
    111         $list_types = array('title', 'short', 'full'); 
     111        $list_types = ['title', 'short', 'full']; 
    112112 
    113113        // Get all _entry-*.html in tpl folder of theme 
     
    133133            $ret .= '   case \'' . $v . '\':' . "\n" . 
    134134            '?>' . "\n" . 
    135             $core->tpl->includeFile(array('src' => '_entry-' . $v . '.html')) . "\n" . 
     135            $core->tpl->includeFile(['src' => '_entry-' . $v . '.html']) . "\n" . 
    136136                '<?php ' . "\n" . 
    137137                '       break;' . "\n"; 
     
    303303 
    304304        $ret = ''; 
    305         $css = array(); 
    306         $uri = array(); 
     305        $css = []; 
     306        $uri = []; 
    307307        if (!isset($s['body_font']) || ($s['body_font'] == '')) { 
    308308            // See if webfont defined for main font 
     
    369369        } 
    370370 
    371         $css = array(); 
     371        $css = []; 
    372372 
    373373        # Properties 
     
    420420 
    421421        # Large screens 
    422         $css_large = array(); 
     422        $css_large = []; 
    423423 
    424424        # Blog title font weight 
     
    478478 
    479479        # Small screens 
    480         $css_small = array(); 
     480        $css_small = []; 
    481481 
    482482        # Blog title font weight 
     
    532532    } 
    533533 
    534     protected static $fonts = array( 
     534    protected static $fonts = [ 
    535535        // Theme standard 
    536536        'Ductile body'      => '"Century Schoolbook", "Century Schoolbook L", Georgia, serif', 
     
    552552        // Monospace families 
    553553        'Monospace'         => 'Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace' 
    554     ); 
     554    ]; 
    555555 
    556556    protected static function fontDef($c) 
Note: See TracChangeset for help on using the changeset viewer.

Sites map