| 1 |
<?php |
| 2 |
|
| 3 |
if (!function_exists('wp_extra_get_option')) { |
| 4 |
function wp_extra_get_option($key, $fallback = null) |
| 5 |
{ |
| 6 |
$options = get_option('wp_extra', []); |
| 7 |
return array_key_exists($key, $options) && $options[$key] !== '' ? $options[$key] : $fallback; |
| 8 |
} |
| 9 |
} |
| 10 |
if (!function_exists('wp_extra_key')) { |
| 11 |
function wp_extra_key() |
| 12 |
{ |
| 13 |
return wp_extra_get_option('license_status') === 'valid'; |
| 14 |
} |
| 15 |
} |
| 16 |
|
| 17 |
/* if(!function_exists('wp_extra_view')) { |
| 18 |
function wp_extra_view($view, $data = [], $buffer = false) |
| 19 |
{ |
| 20 |
$file = plugin_dir_path(WPEX_FILE) . 'views/' . $view . '.php'; |
| 21 |
if (! file_exists($file)) { |
| 22 |
return; |
| 23 |
} |
| 24 |
extract($data); |
| 25 |
if($buffer) { |
| 26 |
ob_start(); |
| 27 |
} |
| 28 |
include $file; |
| 29 |
if($buffer) { |
| 30 |
return ob_get_clean(); |
| 31 |
} |
| 32 |
} |
| 33 |
} */ |