esc_html__('Asked Any Question','business-trade'), 'image' => '', 'background-image' => '', 'features' =>'', ); return $defaults; } function __construct() { parent::__construct( /*Base ID of your widget*/ 'business_trade_faq_widget', /*Widget name will appear in UI*/ __( 'TM: Faq Widget', 'business-trade' ), /*Widget description*/ array( 'description' => __( 'TM: Faq Widget,Best Used in Home page or Other Page', 'business-trade' ), ) ); } /** * Function to Creating widget front-end. This is where the action happens * @access public * @since 1.0 * @param array $args widget setting * @param array $instance saved values * @return void */ public function widget( $args, $instance ) { if (!empty( $instance ) ) { $instance = wp_parse_args( (array ) $instance, $this->defaults ()); $title = apply_filters( 'widget_title', ! empty( $instance['title'] ) ? $instance['title'] : '', $instance, $this->id_base ); $image = esc_url($instance[ 'image']); $bgimage = esc_url($instance[ 'background-image']); $features = ( ! empty( $instance['features'] ) ) ? $instance['features'] : array(); echo $args['before_widget']; if (isset($features) ) : ?>
';
?>
';
?>