* @copyright Copyright (C) 2019 wpopal.com. All Rights Reserved. * @license GNU/GPL v2 or later http://www.gnu.org/licenses/gpl-2.0.html * * @website http://www.wpopal.com * @support http://www.wpopal.com/questions/ */ class Opalestate_search_properties_Widget extends WP_Widget { /** * Opalestate_search_properties_Widget constructor. */ public function __construct() { parent::__construct( // Base ID of your widget 'opalestate_search_properties_widget', // Widget name will appear in UI __( 'Estate: Search Properties', 'opalestate-pro' ), // Widget description [ 'description' => esc_html__( 'Search Properties widget.', 'opalestate-pro' ), ] ); } public function widget( $args, $instance ) { extract( $args ); extract( $instance ); //Our variables from the widget settings. $title = apply_filters( 'widget_title', esc_attr( $instance['title'] ) ); // Output the widget. echo $before_widget; // @WPCS: XSS OK. if ( $title ) { echo $before_title . $title . $after_title; // @WPCS: XSS OK. } ?>
esc_html__( 'No', 'opalestate-pro' ), 'true' => esc_html__( 'Yes', 'opalestate-pro' ), ]; } } register_widget( 'Opalestate_search_properties_Widget' );