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