'widget_testimonial_slide_section', 'description' => esc_html__( 'Display Testimonial Slide in home page', 'businessdeal') ); $control_ops = array('width' => 200, 'height' => 250); parent::__construct( false, $name=esc_html__('T-Spiral: Testimonial Slide','businessdeal'), $widget_ops, $control_ops ); } /** * Back-end widget form. * * @see WP_Widget::form() * */ public function form( $instance ) { $instance = wp_parse_args((array) $instance, array('no_of_testimonial' => '3','welcome_title' => '','brand_image' => '','page_id0'=>'','page_id1'=>'','page_id2'=>'' )); $no_of_testimonial = absint( $instance[ 'no_of_testimonial' ] ); $welcome_title = esc_attr($instance['welcome_title']); $brand_image = esc_url($instance['brand_image']); for ($i = 0; $i < $no_of_testimonial; $i++) { $var = 'page_id'.$i; $defaults[$var] = ''; } $instance = wp_parse_args((array)$instance, $defaults); for ($i = 0; $i < $no_of_testimonial; $i++) { $var = 'page_id'.$i; $var = absint($instance[$var]); } ?>
style="display:none;" >
' ','name' => $this->get_field_name( key($defaults) ), 'selected' => $instance[key($defaults)] ) ); ?>
-1, 'post_type' => array( 'page' ), 'post__in' => $page_array, 'orderby' => 'post__in' ) ); echo $before_widget; ?>