default_settings = apply_filters( 'powerkit_widget_about_settings', array( 'title' => esc_html__( 'About', 'powerkit' ), 'subtitle' => '', 'image' => false, 'text' => '', 'button_url' => '', 'button_text' => '', 'social_links' => true, ) ); $widget_details = array( 'classname' => 'powerkit_widget_about', 'description' => '', ); parent::__construct( 'powerkit_widget_about', esc_html__( 'About', 'powerkit' ), $widget_details ); } /** * Outputs the content for the current widget instance. * * @param array $args Display arguments including 'before_title', 'after_title', * 'before_widget', and 'after_widget'. * @param array $instance Settings for the current widget instance. */ public function widget( $args, $instance ) { $params = array_merge( $this->default_settings, $instance ); // Title. if ( $params['title'] ) { $params['widget_title'] = $args['before_title'] . apply_filters( 'widget_title', wp_kses( $params['title'], 'pk-title' ), $instance, $this->id_base ) . $args['after_title']; } // Before Widget. echo $args['before_widget']; // XSS. ?>
default_settings, $instance ); $bg_image_url = $params['image'] ? wp_get_attachment_image_url( intval( $params['image'] ), 'large' ) : ''; ?>
/>