'joy_ads_widget', 'description' => esc_html__('You can place advertisement links with images here', 'brunch-lite') ); $control_ops = array( 'id_base' => 'joy_ads_widget' ); parent::__construct( 'joy_ads_widget', esc_html__('Brunch Pro: Ads Widget', 'brunch-lite'), $widget_ops, $control_ops ); add_action( 'admin_enqueue_scripts', array($this,'enqueue_admin_scripts')); $this->defaults = array( 'title' => esc_html__('Advertisement', 'brunch-lite'), 'size' => 'large', 'num_per_view' => 1, 'rotate' => 0, 'randomize' => 0, 'ad_width' => '', 'ad_height' => '', 'ads' => array(), 'nofollow' => 0, 'speed' => 5, 'no_target_blank' => 0 ); //Allow themes or plugins to modify default parameters $this->defaults = apply_filters('joy_ads_widget_modify_defaults', $this->defaults); } function enqueue_admin_scripts(){ wp_enqueue_media(); wp_enqueue_style( 'joy-ads-widget-admin', get_template_directory_uri() . '/assets/css/ads-admin-style.css', false, BRUNCH_VERSION ); wp_enqueue_script( 'joy-ads-widget-js', get_template_directory_uri() . '/assets/js/ads-main.js', array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-tabs'), BRUNCH_VERSION ); } function widget( $args, $instance ) { $instance = wp_parse_args( (array) $instance, $this->defaults ); extract( $args ); $title = apply_filters('widget_title', $instance['title'] ); echo $before_widget; if ( !empty($title) ) { echo $before_title . $title . $after_title; } ?>
id; $slide_func_id = str_replace("-","",$this->id); $li_ind = 'li_ind_'.$slide_func_id; ?> defaults ); ?>
/>
/>
/>
: px : px
/>
:
/>
/>
/>