Passed
Push — master ( 478c3f...09294d )
by Dominik
03:57
created

getTheme()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 13
nc 1
nop 0
dl 0
loc 15
rs 9.8333
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Defines field variables to be used across multiple components.
5
 */
6
7
namespace Flynt\FieldVariables;
8
9
function getTheme()
10
{
11
    return [
12
        'label' => __('Theme', 'flynt'),
13
        'name' => 'theme',
14
        'type' => 'select',
15
        'allow_null' => 0,
16
        'multiple' => 0,
17
        'ui' => 0,
18
        'ajax' => 0,
19
        'choices' => [
20
            '' => __('(none)', 'flynt'),
21
            'themeLight' => __('Light', 'flynt'),
22
            'themeDark' => __('Dark', 'flynt'),
23
            'themeHero' => __('Hero', 'flynt'),
24
        ]
25
    ];
26
}
27
28
function getIcon()
29
{
30
    return [
31
        'label' => __('Icon', 'flynt'),
32
        'name' => 'icon',
33
        'type' => 'text',
34
        'instructions' => __('Enter a valid icon name from <a href="https://feathericons.com">Feather Icons</a> (e.g. `check-circle`).', 'flynt'),
35
        'required' => 1
36
    ];
37
}
38