fraservalley (June 20th, 2011)
// classipress sidebar search widget
class CP_Widget_Search extends WP_Widget {
function CP_Widget_Search() {
$widget_ops = array( 'description' => __( 'Your sidebar ad search box', 'appthemes') );
$this->WP_Widget('ad_search', 'CP ' . __('Ad Search Box', 'appthemes'), $widget_ops);
}
function widget( $args, $instance ) {
extract($args);
$title = apply_filters('widget_title', empty($instance['title']) ? __('Search Classified Ads', 'appthemes') : $instance['title']);
echo $before_widget;
if ($title) echo $before_title . $title . $after_title;
//echo '<div>';
cp_ad_search_widget();
//echo "</div>\n";
echo $after_widget;
}
function update($new_instance, $old_instance) {
$instance['title'] = strip_tags(stripslashes($new_instance['title']));
return $instance;
}
function form($instance) {
?>
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'appthemes') ?></label>
<input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php if (isset ($instance['title'])) {echo esc_attr( $instance['title']);} ?>" /></p>
<?php
}
}
$title = apply_filters('widget_title', empty($instance['title']) ? __('Search Classified Ads', 'appthemes') : $instance['title']);
fraservalley (June 20th, 2011)
There are currently 1 users browsing this thread. (0 members and 1 guests)