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