| 1 |
<?php |
| 2 |
|
| 3 |
namespace UltimatePostKit\Includes; |
| 4 |
|
| 5 |
use UltimatePostKit\Admin\ModuleService; |
| 6 |
|
| 7 |
if (!defined('ABSPATH')) exit; // Exit if accessed directly |
| 8 |
|
| 9 |
class Pro_Widget_Map |
| 10 |
{ |
| 11 |
|
| 12 |
public function get_pro_widget_map() |
| 13 |
{ |
| 14 |
|
| 15 |
$arr_obj = ModuleService::get_widget_settings( |
| 16 |
function ($settings) { |
| 17 |
$core_widgets = $settings['settings_fields']['ultimate_post_kit_active_modules']; |
| 18 |
|
| 19 |
$arr = []; |
| 20 |
|
| 21 |
foreach ($core_widgets as $key => $widget) { |
| 22 |
|
| 23 |
if ('pro' == $widget['widget_type']) { |
| 24 |
|
| 25 |
$ar = [ |
| 26 |
'categories' => ['ultimate-post-kit-pro-tweeks'], |
| 27 |
'name' => $widget['name'], |
| 28 |
'title' => $widget['label'], |
| 29 |
'icon' => 'upk-icon-' . $widget['name'] . ' bdt-pro-unlock-icon', |
| 30 |
'action_button' => [ |
| 31 |
'classes' => ['elementor-button', 'elementor-button-success'], |
| 32 |
'text' => esc_html__('See it in Action', 'ultimate-post-kit'), |
| 33 |
'url' => esc_url($widget['demo_url']) |
| 34 |
] |
| 35 |
]; |
| 36 |
|
| 37 |
array_push($arr, $ar); |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
return $arr; |
| 42 |
} |
| 43 |
); |
| 44 |
|
| 45 |
return $arr_obj; |
| 46 |
} |
| 47 |
} |
| 48 |
|