'', 'shortcode' => '', 'page_id' => '', 'section-id' =>'', ); function __construct() { parent::__construct( /*Base ID of your widget*/ 'business_form_contact', /*Widget name will appear in UI*/ __('AT : Contact Widgets', 'business-form'), /*Widget description*/ array( 'description' => __( 'Show Contact Section.', 'business-form' ), ) ); } /*Widget Backend*/ public function form( $instance ) { $instance = wp_parse_args( (array) $instance, $this->defaults ); /*default values*/ $title = esc_attr( $instance[ 'title' ] ); $shortcode = esc_attr( $instance[ 'shortcode' ] ); $page_id = absint( $instance[ 'page_id' ] ); $section_id= esc_attr( $instance['section-id'] ); ?>
","" ); ?>
$page_id,
'name' => $this->get_field_name( 'page_id' ),
'id' => $this->get_field_id( 'page_id' ),
'class' => 'widefat',
'show_option_none' => __('Select Page','business-form'),
);
wp_dropdown_pages( $args );
?>
id="get_field_id('post_image'); ?>" name="get_field_name('post_image'); ?>"/>
defaults); $title = apply_filters('widget_title', !empty($instance['title']) ? $instance['title'] : '', $instance, $this->id_base); $shortcode = wp_kses_post($instance['shortcode']); $page_id = absint($instance['page_id']); $post_image = $instance['post_image'] ? 'true' : 'false'; $section_id = esc_attr($instance['section-id']); echo $args['before_widget']; ?>