File: /home/lesanew/www/wp-content/plugins/neobeat-core/inc/shortcodes/icon/widget/icon.php
<?php
if ( ! function_exists( 'neobeat_core_add_icon_widget' ) ) {
/**
* Function that add widget into widgets list for registration
*
* @param $widgets array
*
* @return array
*/
function neobeat_core_add_icon_widget( $widgets ) {
$widgets[] = 'NeoBeatCoreIconWidget';
return $widgets;
}
add_filter( 'neobeat_core_filter_register_widgets', 'neobeat_core_add_icon_widget' );
}
if ( class_exists( 'QodeFrameworkWidget' ) ) {
class NeoBeatCoreIconWidget extends QodeFrameworkWidget {
public function map_widget() {
$widget_mapped = $this->import_shortcode_options( array(
'shortcode_base' => 'neobeat_core_icon'
) );
if( $widget_mapped ) {
$this->set_base( 'neobeat_core_icon' );
$this->set_name( esc_html__( 'NeoBeat Icon', 'neobeat-core' ) );
$this->set_description( esc_html__( 'Add a icon element into widget areas', 'neobeat-core' ) );
}
}
public function render( $atts ) {
$params = $this->generate_string_params( $atts );
echo do_shortcode( "[neobeat_core_icon $params]" ); // XSS OK
}
}
}