/**
  * Outputs the widget based on the arguments input through the widget controls.
  *
  * @since 1.0
  */
 function widget($sidebar, $instance)
 {
     extract($sidebar);
     /* Set the $args for wp_get_archives() to the $instance array. */
     $args = $instance;
     /* Overwrite the $echo argument and set it to false. */
     $args['echo'] = false;
     /* Output the theme's $before_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;
     }
     echo shandora_get_search_listing_form($this->id_base);
     /* Close the theme's widget wrapper. */
     echo $after_widget;
 }
Esempio n. 2
0
/**
 * =====================================================================================================
 *
 * Setup a search listing form
 * Created using global $bon->form() instance
 *
 *
 * @since 1.0
 *
 * ======================================================================================================
 */
function shandora_search_listing_form()
{
    $show_idx = bon_get_option('use_idx_search');
    if (defined("DSIDXPRESS_OPTION_NAME") && $show_idx == 'yes') {
        $options = get_option(DSIDXPRESS_OPTION_NAME);
        if ($options["Activated"]) {
            shandora_get_search_listing_form_idx();
        } else {
            echo __('Please Activate Your IDX Account.', 'bon');
        }
    } else {
        echo shandora_get_search_listing_form();
    }
}