PluginProbe
WpStream – Live Streaming, Video on Demand, Pay Per View / 4.12.2
WpStream – Live Streaming, Video on Demand, Pay Per View v4.12.2
4.14.1 4.14.0 4.13.2 4.13.1 4.13 4.12.5 4.12.4 4.12.3 4.12.2 4.12.1 4.12 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5 4.5.1 4.5.11 4.5.11.1 4.5.11.2 4.5.11.4 4.5.11.5 4.5.11.6 All 181 releases
wpstream / hello-wpstream / framework / options / theme-options.php

theme-options.php in WpStream – Live Streaming, Video on Demand, Pay Per View 4.12.2, at hello-wpstream/framework/options/theme-options.php

375 lines 9.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Theme options
4 *
5 * @package wpstream-theme
6 */
7
8 if ( ! class_exists( 'Redux' ) ) {
9 return;
10 }
11
12 global $wpstream_opt_name, $country_list, $allowed_html_array;
13
14 $allowed_html_array = array(
15 'i' => array(
16 'class' => array(),
17 ),
18 'span' => array(
19 'class' => array(),
20 ),
21 'a' => array(
22 'href' => array(),
23 'title' => array(),
24 'target' => array(),
25 ),
26 );
27
28 // This is your option name where all the Redux data is stored.
29 $wpstream_opt_name = 'wpstream_options';
30
31 // This line is only for altering the demo. Can be easily removed.
32 $wpstream_opt_name = apply_filters( 'redux_demo_opt_name', $wpstream_opt_name );
33 $redux_path = ReduxFramework::$_dir;
34 $redux_url = ReduxFramework::$_url;
35 $img_url = $redux_url . 'assets/img/';
36 $theme = wp_get_theme(); // For use with some settings. Not necessary.
37 $theme_name = $theme->get( 'Name' );
38
39 // ADMIN BAR LINKS -> Setup custom links in the admin bar menu as external items.
40 $args['admin_bar_links'][] = array(
41 'id' => 'wpstream-support',
42 'href' => 'https://wpstream.net',
43 'title' => esc_html__( 'Support', 'hello-wpstream' ),
44 );
45
46 $args['share_icons'][] = array(
47 'url' => '',
48 'title' => 'Like us on Facebook',
49 'icon' => 'el el-facebook',
50 );
51
52 $args['share_icons'][] = array(
53 'url' => '',
54 'title' => 'Follow us on Twitter',
55 'icon' => 'el el-twitter',
56 );
57
58 Redux::setArgs( $wpstream_opt_name, $args );
59
60 // Change the arguments after they've been declared, but before the panel is created.
61 add_filter( 'redux/options/' . $wpstream_opt_name . '/args', 'change_arguments' );
62
63 // If Redux is running as a plugin, this will remove the demo notice and links.
64 add_action( 'redux/loaded', 'remove_demo' );
65
66 /**
67 * Filter hook for filtering the args. Good for child themes to override or add to the args array. Can also be used in other functions.
68 * */
69 if ( ! function_exists( 'change_arguments' ) ) {
70 /**
71 * Changes the arguments by adding or modifying specific parameters.
72 *
73 * @param array $args The original arguments.
74 * @return array The modified arguments.
75 */
76 function change_arguments( $args ) {
77 $args['dev_mode'] = false;
78
79 return $args;
80 }
81 }
82
83 /**
84 * Removes the demo link and the notice of integrated demo from the redux-framework plugin
85 */
86 if ( ! function_exists( 'remove_demo' ) ) {
87 /**
88 * Remove demo
89 */
90 function remove_demo() {
91 // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin.
92 if ( class_exists( 'ReduxFrameworkPlugin' ) ) {
93 remove_filter(
94 'plugin_row_meta',
95 array(
96 ReduxFrameworkPlugin::instance(),
97 'plugin_metalinks',
98 ),
99 null,
100 2
101 );
102 // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.
103 remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) );
104 }
105 }
106 }
107
108 if ( ! function_exists( 'wpstream_return_option' ) ) {
109 /**
110 * Returns the value of a specified option from the 'wpstream_options' settings.
111 *
112 * @param string $opt_name The name of the option.
113 * @param mixed $is_default (Optional) The default value to return if the option does not exist.
114 * @return mixed The value of the option if it exists, otherwise the default value.
115 */
116 function wpstream_return_option( $opt_name, $is_default = null ) {
117 $wpstream_option = get_option( 'wpstream_options' );
118
119 $option_val = isset( $wpstream_option[ $opt_name ] ) ? $wpstream_option[ $opt_name ] : $is_default;
120 return $option_val;
121 }
122 }
123
124 $country_list = array(
125 'US' => 'United States',
126 'CA' => 'Canada',
127 'AU' => 'Australia',
128 'FR' => 'France',
129 'DE' => 'Germany',
130 'IS' => 'Iceland',
131 'IE' => 'Ireland',
132 'IT' => 'Italy',
133 'ES' => 'Spain',
134 'SE' => 'Sweden',
135 'AT' => 'Austria',
136 'BE' => 'Belgium',
137 'FI' => 'Finland',
138 'CZ' => 'Czech Republic',
139 'DK' => 'Denmark',
140 'NO' => 'Norway',
141 'GB' => 'United Kingdom',
142 'CH' => 'Switzerland',
143 'NZ' => 'New Zealand',
144 'RU' => 'Russian Federation',
145 'PT' => 'Portugal',
146 'NL' => 'Netherlands',
147 'IM' => 'Isle of Man',
148 'AF' => 'Afghanistan',
149 'AX' => 'Aland Islands ',
150 'AL' => 'Albania',
151 'DZ' => 'Algeria',
152 'AS' => 'American Samoa',
153 'AD' => 'Andorra',
154 'AO' => 'Angola',
155 'AI' => 'Anguilla',
156 'AQ' => 'Antarctica',
157 'AG' => 'Antigua and Barbuda',
158 'AR' => 'Argentina',
159 'AM' => 'Armenia',
160 'AW' => 'Aruba',
161 'AZ' => 'Azerbaijan',
162 'BS' => 'Bahamas',
163 'BH' => 'Bahrain',
164 'BD' => 'Bangladesh',
165 'BB' => 'Barbados',
166 'BY' => 'Belarus',
167 'BZ' => 'Belize',
168 'BJ' => 'Benin',
169 'BM' => 'Bermuda',
170 'BT' => 'Bhutan',
171 'BO' => 'Bolivia, Plurinational State of',
172 'BQ' => 'Bonaire, Sint Eustatius and Saba',
173 'BA' => 'Bosnia and Herzegovina',
174 'BW' => 'Botswana',
175 'BV' => 'Bouvet Island',
176 'BR' => 'Brazil',
177 'IO' => 'British Indian Ocean Territory',
178 'BN' => 'Brunei Darussalam',
179 'BG' => 'Bulgaria',
180 'BF' => 'Burkina Faso',
181 'BI' => 'Burundi',
182 'KH' => 'Cambodia',
183 'CM' => 'Cameroon',
184 'CV' => 'Cape Verde',
185 'KY' => 'Cayman Islands',
186 'CF' => 'Central African Republic',
187 'TD' => 'Chad',
188 'CL' => 'Chile',
189 'CN' => 'China',
190 'CX' => 'Christmas Island',
191 'CC' => 'Cocos (Keeling) Islands',
192 'CO' => 'Colombia',
193 'KM' => 'Comoros',
194 'CG' => 'Congo',
195 'CD' => 'Congo, the Democratic Republic of the',
196 'CK' => 'Cook Islands',
197 'CR' => 'Costa Rica',
198 'CI' => 'Cote d\'Ivoire',
199 'HR' => 'Croatia',
200 'CU' => 'Cuba',
201 'CW' => 'Curaçao',
202 'CY' => 'Cyprus',
203 'DJ' => 'Djibouti',
204 'DM' => 'Dominica',
205 'DO' => 'Dominican Republic',
206 'EC' => 'Ecuador',
207 'EG' => 'Egypt',
208 'SV' => 'El Salvador',
209 'GQ' => 'Equatorial Guinea',
210 'ER' => 'Eritrea',
211 'EE' => 'Estonia',
212 'ET' => 'Ethiopia',
213 'FK' => 'Falkland Islands (Malvinas)',
214 'FO' => 'Faroe Islands',
215 'FJ' => 'Fiji',
216 'GF' => 'French Guiana',
217 'PF' => 'French Polynesia',
218 'TF' => 'French Southern Territories',
219 'GA' => 'Gabon',
220 'GM' => 'Gambia',
221 'GE' => 'Georgia',
222 'GH' => 'Ghana',
223 'GI' => 'Gibraltar',
224 'GR' => 'Greece',
225 'GL' => 'Greenland',
226 'GD' => 'Grenada',
227 'GP' => 'Guadeloupe',
228 'GU' => 'Guam',
229 'GT' => 'Guatemala',
230 'GG' => 'Guernsey',
231 'GN' => 'Guinea',
232 'GW' => 'Guinea-Bissau',
233 'GY' => 'Guyana',
234 'HT' => 'Haiti',
235 'HM' => 'Heard Island and McDonald Islands',
236 'VA' => 'Holy See (Vatican City State)',
237 'HN' => 'Honduras',
238 'HK' => 'Hong Kong',
239 'HU' => 'Hungary',
240 'IN' => 'India',
241 'ID' => 'Indonesia',
242 'IR' => 'Iran, Islamic Republic of',
243 'IQ' => 'Iraq',
244 'IL' => 'Israel',
245 'JM' => 'Jamaica',
246 'JP' => 'Japan',
247 'JE' => 'Jersey',
248 'JO' => 'Jordan',
249 'KZ' => 'Kazakhstan',
250 'KE' => 'Kenya',
251 'KI' => 'Kiribati',
252 'KP' => 'Korea, Democratic People\'s Republic of',
253 'KR' => 'Korea, Republic of',
254 'KV' => 'kosovo',
255 'KW' => 'Kuwait',
256 'KG' => 'Kyrgyzstan',
257 'LA' => 'Lao People\'s Democratic Republic',
258 'LV' => 'Latvia',
259 'LB' => 'Lebanon',
260 'LS' => 'Lesotho',
261 'LR' => 'Liberia',
262 'LY' => 'Libyan Arab Jamahiriya',
263 'LI' => 'Liechtenstein',
264 'LT' => 'Lithuania',
265 'LU' => 'Luxembourg',
266 'MO' => 'Macao',
267 'MK' => 'Macedonia',
268 'MG' => 'Madagascar',
269 'MW' => 'Malawi',
270 'MY' => 'Malaysia',
271 'MV' => 'Maldives',
272 'ML' => 'Mali',
273 'MT' => 'Malta',
274 'MH' => 'Marshall Islands',
275 'MQ' => 'Martinique',
276 'MR' => 'Mauritania',
277 'MU' => 'Mauritius',
278 'YT' => 'Mayotte',
279 'MX' => 'Mexico',
280 'FM' => 'Micronesia, Federated States of',
281 'MD' => 'Moldova, Republic of',
282 'MC' => 'Monaco',
283 'MN' => 'Mongolia',
284 'ME' => 'Montenegro',
285 'MS' => 'Montserrat',
286 'MA' => 'Morocco',
287 'MZ' => 'Mozambique',
288 'MM' => 'Myanmar',
289 'NA' => 'Namibia',
290 'NR' => 'Nauru',
291 'NP' => 'Nepal',
292 'NC' => 'New Caledonia',
293 'NI' => 'Nicaragua',
294 'NE' => 'Niger',
295 'NG' => 'Nigeria',
296 'NU' => 'Niue',
297 'NF' => 'Norfolk Island',
298 'MP' => 'Northern Mariana Islands',
299 'OM' => 'Oman',
300 'PK' => 'Pakistan',
301 'PW' => 'Palau',
302 'PS' => 'Palestinian Territory, Occupied',
303 'PA' => 'Panama',
304 'PG' => 'Papua New Guinea',
305 'PY' => 'Paraguay',
306 'PE' => 'Peru',
307 'PH' => 'Philippines',
308 'PN' => 'Pitcairn',
309 'PL' => 'Poland',
310 'PR' => 'Puerto Rico',
311 'QA' => 'Qatar',
312 'RE' => 'Reunion',
313 'RO' => 'Romania',
314 'RW' => 'Rwanda',
315 'BL' => 'Saint Barthélemy',
316 'SH' => 'Saint Helena',
317 'KN' => 'Saint Kitts and Nevis',
318 'LC' => 'Saint Lucia',
319 'MF' => 'Saint Martin (French part)',
320 'PM' => 'Saint Pierre and Miquelon',
321 'VC' => 'Saint Vincent and the Grenadines',
322 'WS' => 'Samoa',
323 'SM' => 'San Marino',
324 'ST' => 'Sao Tome and Principe',
325 'SA' => 'Saudi Arabia',
326 'SN' => 'Senegal',
327 'RS' => 'Serbia',
328 'SC' => 'Seychelles',
329 'SL' => 'Sierra Leone',
330 'SG' => 'Singapore',
331 'SX' => 'Sint Maarten (Dutch part)',
332 'SK' => 'Slovakia',
333 'SI' => 'Slovenia',
334 'SB' => 'Solomon Islands',
335 'SO' => 'Somalia',
336 'ZA' => 'South Africa',
337 'GS' => 'South Georgia and the South Sandwich Islands',
338 'LK' => 'Sri Lanka',
339 'SD' => 'Sudan',
340 'SR' => 'Suriname',
341 'SJ' => 'Svalbard and Jan Mayen',
342 'SZ' => 'Swaziland',
343 'SY' => 'Syrian Arab Republic',
344 'TW' => 'Taiwan, Province of China',
345 'TJ' => 'Tajikistan',
346 'TZ' => 'Tanzania, United Republic of',
347 'TH' => 'Thailand',
348 'TL' => 'Timor-Leste',
349 'TG' => 'Togo',
350 'TK' => 'Tokelau',
351 'TO' => 'Tonga',
352 'TT' => 'Trinidad and Tobago',
353 'TN' => 'Tunisia',
354 'TR' => 'Turkey',
355 'TM' => 'Turkmenistan',
356 'TC' => 'Turks and Caicos Islands',
357 'TV' => 'Tuvalu',
358 'UG' => 'Uganda',
359 'UA' => 'Ukraine',
360 'UAE' => 'United Arab Emirates',
361 'UM' => 'United States Minor Outlying Islands',
362 'UY' => 'Uruguay',
363 'UZ' => 'Uzbekistan',
364 'VU' => 'Vanuatu',
365 'VE' => 'Venezuela, Bolivarian Republic of',
366 'VN' => 'Viet Nam',
367 'VG' => 'Virgin Islands, British',
368 'VI' => 'Virgin Islands, U.S.',
369 'WF' => 'Wallis and Futuna',
370 'EH' => 'Western Sahara',
371 'YE' => 'Yemen',
372 'ZM' => 'Zambia',
373 'ZW' => 'Zimbabwe',
374 );
375