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/blowupConfig/lib/class.blowup.config.php

    r3731 r3874  
    1717    protected static $img_folder = 'blowup-images'; 
    1818 
    19     protected static $fonts = array( 
    20         'sans-serif' => array( 
     19    protected static $fonts = [ 
     20        'sans-serif' => [ 
    2121            'ss1' => 'Arial, Helvetica, sans-serif', 
    2222            'ss2' => 'Verdana,Geneva, Arial, Helvetica, sans-serif', 
     
    2424            'ss4' => '"Trebuchet MS", Helvetica, sans-serif', 
    2525            'ss5' => 'Impact, Charcoal, sans-serif' 
    26         ), 
    27  
    28         'serif'      => array( 
     26        ], 
     27 
     28        'serif'      => [ 
    2929            's1' => 'Times, "Times New Roman", serif', 
    3030            's2' => 'Georgia, serif', 
    3131            's3' => 'Baskerville, "Palatino Linotype", serif' 
    32         ), 
    33  
    34         'monospace'  => array( 
     32        ], 
     33 
     34        'monospace'  => [ 
    3535            'm1' => '"Andale Mono", "Courier New", monospace', 
    3636            'm2' => '"Courier New", Courier, mono, monospace' 
    37         ) 
    38     ); 
    39  
    40     protected static $fonts_combo = array(); 
    41     protected static $fonts_list  = array(); 
    42  
    43     public static $top_images = array( 
     37        ] 
     38    ]; 
     39 
     40    protected static $fonts_combo = []; 
     41    protected static $fonts_list  = []; 
     42 
     43    public static $top_images = [ 
    4444        'default'        => 'Default', 
    4545        'blank'          => 'Blank', 
     
    5858        'roadrunner-2'   => 'Road Runner 2', 
    5959        'typo'           => 'Typo' 
    60     ); 
     60    ]; 
    6161 
    6262    public static function fontsList() 
     
    6565            self::$fonts_combo[__('default')] = ''; 
    6666            foreach (self::$fonts as $family => $g) { 
    67                 $fonts = array(); 
     67                $fonts = []; 
    6868                foreach ($g as $code => $font) { 
    6969                    $fonts[str_replace('"', '', $font)] = $code; 
     
    157157        } 
    158158 
    159         $css = array(); 
     159        $css = []; 
    160160 
    161161        /* Sidebar position 
     
    199199            dcThemeConfig::prop($css, '#top h1 span', 'text-indent', '-5000px'); 
    200200            dcThemeConfig::prop($css, '#top h1', 'top', '0px'); 
    201             $css['#top h1 a'] = array( 
     201            $css['#top h1 a'] = [ 
    202202                'display' => 'block', 
    203203                'height'  => $s['top_height'] ? ($s['top_height'] - 10) . 'px' : '120px', 
    204204                'width'   => '800px' 
    205             ); 
     205            ]; 
    206206        } 
    207207        dcThemeConfig::prop($css, '#top', 'height', $s['top_height']); 
     
    325325        } 
    326326 
    327         $body_fill = array( 
     327        $body_fill = [ 
    328328            'light'  => dirname(__FILE__) . '/../alpha-img/gradient-l.png', 
    329329            'medium' => dirname(__FILE__) . '/../alpha-img/gradient-m.png', 
    330330            'dark'   => dirname(__FILE__) . '/../alpha-img/gradient-d.png' 
    331         ); 
     331        ]; 
    332332 
    333333        $body_g = isset($body_fill[$gradient]) ? $body_fill[$gradient] : false; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map