|
1
|
|
|
<?php |
|
|
|
|
|
|
2
|
|
|
/** |
|
|
|
|
|
|
3
|
|
|
* @author Podlove <[email protected]> |
|
4
|
|
|
* @copyright Copyright (c) 2014-2018, Podlove |
|
5
|
|
|
* @license https://github.com/podlove/podlove-subscribe-button-wp-plugin/blob/master/LICENSE MIT |
|
6
|
|
|
* @package Podlove\PodloveSubscribeButton |
|
7
|
|
|
*/ |
|
8
|
|
|
|
|
9
|
|
|
namespace PodloveSubscribeButton; |
|
10
|
|
|
|
|
11
|
|
|
class Defaults { |
|
|
|
|
|
|
12
|
|
|
|
|
13
|
|
|
static function button( $property ) { |
|
|
|
|
|
|
14
|
|
|
|
|
15
|
|
|
$style = array( |
|
16
|
|
|
'filled' => __( 'Filled', 'podlove-subscribe-button' ), |
|
17
|
|
|
'outline' => __( 'Outline', 'podlove-subscribe-button' ), |
|
18
|
|
|
'frameless' => __( 'Frameless', 'podlove-subscribe-button' ), |
|
19
|
|
|
); |
|
20
|
|
|
|
|
21
|
|
|
$format = array( |
|
22
|
|
|
'rectangle' => __( 'Rectangle', 'podlove-subscribe-button' ), |
|
23
|
|
|
'square' => __( 'Square', 'podlove-subscribe-button' ), |
|
24
|
|
|
'cover' => __( 'Cover', 'podlove-subscribe-button' ), |
|
25
|
|
|
); |
|
26
|
|
|
|
|
27
|
|
|
$width = array( |
|
28
|
|
|
'on' => __( 'Yes', 'podlove-subscribe-button' ), |
|
29
|
|
|
'off' => __( 'No', 'podlove-subscribe-button' ), |
|
30
|
|
|
); |
|
31
|
|
|
|
|
32
|
|
|
$size = array( |
|
33
|
|
|
'small' => __( 'Small', 'podlove-subscribe-button' ), |
|
34
|
|
|
'medium' => __( 'Medium', 'podlove-subscribe-button' ), |
|
35
|
|
|
'big' => __( 'Big', 'podlove-subscribe-button' ), |
|
36
|
|
|
); |
|
37
|
|
|
|
|
38
|
|
|
$language = array( 'de', 'en', 'eo', 'fi', 'fr', 'nl', 'zh', 'ja', ); |
|
|
|
|
|
|
39
|
|
|
|
|
40
|
|
|
return $$property; |
|
41
|
|
|
|
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
|
|
|
|
|
45
|
|
|
* @return array |
|
46
|
|
|
*/ |
|
47
|
|
|
public static function media_types() { |
|
|
|
|
|
|
48
|
|
|
|
|
49
|
|
|
$media_types = array( |
|
50
|
|
|
0 => array( |
|
51
|
|
|
'title' => 'MP3 audio', |
|
52
|
|
|
'mime_type' => 'audio/mpeg', |
|
53
|
|
|
'extension' => 'mp3', |
|
54
|
|
|
), |
|
55
|
|
|
1 => array( |
|
56
|
|
|
'title' => 'MPEG-4 AAC Audio', |
|
57
|
|
|
'mime_type' => 'audio/mp4', |
|
58
|
|
|
'extension' => 'aac', |
|
59
|
|
|
), |
|
60
|
|
|
2 => array( |
|
61
|
|
|
'title' => 'MPEG-4 ALAC Audio', |
|
62
|
|
|
'mime_type' => 'audio/mp4', |
|
63
|
|
|
'extension' => 'aac', |
|
64
|
|
|
), |
|
65
|
|
|
3 => array( |
|
66
|
|
|
'title' => 'Ogg Vorbis Audio', |
|
67
|
|
|
'mime_type' => 'audio/ogg', |
|
68
|
|
|
'extension' => 'ogg', |
|
69
|
|
|
), |
|
70
|
|
|
4 => array( |
|
71
|
|
|
'title' => 'WebM Audio', |
|
72
|
|
|
'mime_type' => 'audio/webm', |
|
73
|
|
|
'extension' => 'webm', |
|
74
|
|
|
), |
|
75
|
|
|
5 => array( |
|
76
|
|
|
'title' => 'FLAC Audio', |
|
77
|
|
|
'mime_type' => 'audio/flac', |
|
78
|
|
|
'extension' => 'flac', |
|
79
|
|
|
), |
|
80
|
|
|
6 => array( |
|
81
|
|
|
'title' => 'Matroska Audio', |
|
82
|
|
|
'mime_type' => 'audio/x-matroska', |
|
83
|
|
|
'extension' => 'mka', |
|
84
|
|
|
), |
|
85
|
|
|
7 => array( |
|
86
|
|
|
'title' => 'Opus Audio', |
|
87
|
|
|
'mime_type' => 'audio/opus', |
|
88
|
|
|
'extension' => 'opus', |
|
89
|
|
|
) |
|
|
|
|
|
|
90
|
|
|
); |
|
91
|
|
|
|
|
92
|
|
|
return apply_filters( 'podlove_subscribe_button_defaults_media_types', $media_types ); |
|
93
|
|
|
|
|
94
|
|
|
} |
|
95
|
|
|
|
|
96
|
|
|
static function options() { |
|
|
|
|
|
|
97
|
|
|
|
|
98
|
|
|
$options = array( |
|
99
|
|
|
'size' => 'big', |
|
100
|
|
|
'autowidth' => 'on', |
|
101
|
|
|
'color' => '#599677', |
|
102
|
|
|
'style' => 'filled', |
|
103
|
|
|
'format' => 'rectangle', |
|
104
|
|
|
'language' => \PodloveSubscribeButton\Helpers::language( '' ), |
|
105
|
|
|
); |
|
106
|
|
|
|
|
107
|
|
|
return apply_filters( 'podlove_subscribe_button_defaults_options', $options ); |
|
108
|
|
|
|
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
} // END class |
|
112
|
|
|
|