| 1 |
<?php |
| 2 |
namespace admin; |
| 3 |
if (!defined('ABSPATH')) { |
| 4 |
exit; |
| 5 |
} // Exit if accessed directly |
| 6 |
|
| 7 |
if ( !function_exists('is_plugin_active') ) { |
| 8 |
include_once(ABSPATH . 'wp-admin/includes/plugin.php'); |
| 9 |
} |
| 10 |
|
| 11 |
class Pro_Widget_Service { |
| 12 |
|
| 13 |
public static function get_widget_settings($callable) |
| 14 |
{ |
| 15 |
|
| 16 |
$settings_fields = [ |
| 17 |
'bbpc_active_modules' => [ |
| 18 |
[ |
| 19 |
'name' => 'ama_ajax_forum', |
| 20 |
'label' => esc_html__('BBPC Ajax Forums', 'bbp-core'), |
| 21 |
'type' => 'checkbox', |
| 22 |
'default' => 'off', |
| 23 |
'widget_type' => 'pro', |
| 24 |
'demo_url' => 'https://spider-themes.net/bbp-core/', |
| 25 |
//'video_url' => 'https://youtu.be/Lq_st2IWZiE', |
| 26 |
], |
| 27 |
[ |
| 28 |
'name' => 'ama_forum_posts', |
| 29 |
'label' => esc_html__('BBPC Forum Topics', 'bbp-core'), |
| 30 |
'type' => 'checkbox', |
| 31 |
'default' => 'off', |
| 32 |
'widget_type' => 'pro', |
| 33 |
'demo_url' => 'https://spider-themes.net/bbp-core/', |
| 34 |
//'video_url' => 'https://youtu.be/Lq_st2IWZiE', |
| 35 |
], |
| 36 |
[ |
| 37 |
'name' => 'ama_forum_tab', |
| 38 |
'label' => esc_html__('BBPC Forum Tabs', 'bbp-core'), |
| 39 |
'type' => 'checkbox', |
| 40 |
'default' => 'off', |
| 41 |
'widget_type' => 'pro', |
| 42 |
'demo_url' => 'https://spider-themes.net/bbp-core/', |
| 43 |
//'video_url' => 'https://youtu.be/Lq_st2IWZiE', |
| 44 |
], |
| 45 |
[ |
| 46 |
'name' => 'ama_forums', |
| 47 |
'label' => esc_html__('BBPC Forums', 'bbp-core'), |
| 48 |
'type' => 'checkbox', |
| 49 |
'default' => 'off', |
| 50 |
'widget_type' => 'pro', |
| 51 |
'demo_url' => 'https://spider-themes.net/bbp-core/', |
| 52 |
//'video_url' => 'https://youtu.be/Lq_st2IWZiE', |
| 53 |
], |
| 54 |
[ |
| 55 |
'name' => 'ama_search', |
| 56 |
'label' => esc_html__('BBPC Search', 'bbp-core'), |
| 57 |
'type' => 'checkbox', |
| 58 |
'default' => 'off', |
| 59 |
'widget_type' => 'pro', |
| 60 |
'demo_url' => 'https://spider-themes.net/bbp-core/', |
| 61 |
//'video_url' => 'https://youtu.be/Lq_st2IWZiE', |
| 62 |
], |
| 63 |
[ |
| 64 |
'name' => 'ama_single_forum', |
| 65 |
'label' => esc_html__('BBPC Single Forum', 'bbp-core'), |
| 66 |
'type' => 'checkbox', |
| 67 |
'default' => 'off', |
| 68 |
'widget_type' => 'pro', |
| 69 |
'demo_url' => 'https://spider-themes.net/bbp-core/', |
| 70 |
//'video_url' => 'https://youtu.be/Lq_st2IWZiE', |
| 71 |
], |
| 72 |
] |
| 73 |
]; |
| 74 |
|
| 75 |
$settings = []; |
| 76 |
$settings['settings_fields'] = $settings_fields; |
| 77 |
|
| 78 |
return $callable($settings); |
| 79 |
} |
| 80 |
|
| 81 |
} |
| 82 |
|
| 83 |
|