'widget_about', 'description' => esc_html__( 'Add company logo with description and social icons', 'solarify' ), ); parent::__construct( false, esc_html__( 'Theme - About', 'solarify' ), $widget_ops ); //Create our options by using Unyson option types $this->options = array( 'title' => array( 'type' => 'text', 'label' => esc_html__( 'Widget Title', 'solarify' ), ), 'about' => array( 'type' => 'wp-editor', 'value' => '', 'label' => esc_html__('Description', 'solarify'), ), ); $this->prefix = 'widget_about'; } function widget( $args, $instance ) { extract( wp_parse_args( $args ) ); $title = esc_attr( $instance['title'] ); $title = $before_title . $title . $after_title; $params = array(); foreach ( $instance as $key => $value ) { $params[ $key ] = $value; } $instance = $params; $filepath = SOLARIFY_THEME_PATH . '/inc/widgets/about/views/widget.php'; if ( file_exists( $filepath ) ) { include( $filepath ); } else { esc_html_e( 'View not found', 'solarify' ); } } function update( $new_instance, $old_instance ) { return fw_get_options_values_from_input( $this->options, FW_Request::POST( fw_html_attr_name_to_array_multi_key( $this->get_field_name( $this->prefix ) ), array() ) ); } function form( $values ) { $prefix = $this->get_field_id( $this->prefix ); // Get unique prefix, preventing duplicated key $id = 'fw-widget-options-' . $prefix; // Print our options echo '
'; return $values; } } endif;