prefix = Easy_get_prefix(); /* Set the widget textdomain. */ $this->textdomain = Easy_get_textdomain(); /* Set up the widget options. */ $widget_options = array( 'classname' => 'calendar', 'description' => esc_html__( 'An advanced widget that gives you total control over the output of your calendar.', $this->textdomain ) ); /* Set up the widget control options. */ $control_options = array( 'width' => 200, 'height' => 350, 'id_base' => "{$this->prefix}-calendar" ); /* Create the widget. */ $this->WP_Widget( "{$this->prefix}-calendar", esc_attr__( 'Calendar', $this->textdomain ), $widget_options, $control_options ); } /** * Outputs the widget based on the arguments input through the widget controls. * @since 0.6.0 */ function widget( $args, $instance ) { extract( $args ); /* Get the $initial argument. */ $initial = !empty( $instance['initial'] ) ? true : false; /* Output the theme's widget wrapper. */ echo $before_widget; /* If a title was input by the user, display it. */ if ( !empty( $instance['title'] ) ) echo $before_title . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . $after_title; /* Display the calendar. */ echo '