'ada_widget_tagcloud', 'description' => __( 'Display a pet color tagcloud','ADA') );
$this->WP_Widget('ada_tagcloud', __('ADA Color Tagcloud','ADA'), $widget_ops);
}
function widget( $args, $instance ) {
extract($args);
if ( !empty($instance['title']) ) {
$title = $instance['title'];
} else {
if ( 'post_tag') {
$title = __('Pet colors tagcloud','ADA');
} else {
}
}
$title = apply_filters('widget_title', $title, $instance, $this->id_base);
echo $before_widget;
if ( $title )
echo $before_title . $title . $after_title;
echo '
';
wp_tag_cloud( array( 'taxonomy' => 'colors', 'smallest'=>'10', 'largest'=>'12' ) );
echo "
\n";
echo $after_widget;
}
function update( $new_instance, $old_instance ) {
$instance['title'] = strip_tags(stripslashes($new_instance['title']));
return $instance;
}
function form( $instance ) {
?>
'ada_widget_searchform', 'description' => __( 'Display a pet searchform','ADA') );
$this->WP_Widget('ada_widget_searchform', __('ADA Search Form','ADA'), $widget_ops);
}
function widget( $args, $instance ) {
extract($args);
if ( !empty($instance['title']) ) {
$title = $instance['title'];
} else {
if ( 'ada_search') {
$title = __('ADA Search Form','ADA');
} else {
$title = $tax->labels->name;
}
}
$title = apply_filters('widget_title', $title, $instance, $this->id_base);
echo $before_widget;
if ( $title )
echo $before_title . $title . $after_title;
echo '';
echo '';
echo '
';
echo $after_widget;
}
function update( $new_instance, $old_instance ) {
$instance['title'] = strip_tags(stripslashes($new_instance['title']));
return $instance;
}
function form( $instance ) {
?>
__('ADA Pets', 'ADA'),'description' => _x('Display pets for adoption','widget pet','ADA')));;
}
/** @see WP_Widget::widget */
function widget($args, $instance) {
extract( $args );
$title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title'], $instance, $this->id_base);
$text = apply_filters( 'widget_text', $instance['text'], $instance );
$sortby = empty( $instance['sortby'] ) ? 'comment_count' : $instance['sortby'];
$r = $instance['rss'] ? '1' : '0';
$status = isset($instance['status']) ? $instance['status'] : false;
$number = isset($instance['number']) ? $instance['number'] : false;
$category = isset($instance['category']) ? $instance['category'] : false;
$q = new WP_Query(array('post_type'=>'pet', 'posts_per_page'=>$number, 'orderby'=>$sortby, 'status' => $status,'types' => $category));
?>
id_base);
$instance = wp_parse_args( (array) $instance, array( 'text' => '', 'sortby' => 'comment_count','category' => false,'status' => false, 'number'=> false ) );
$text = esc_textarea($instance['text']);
$rss = isset($instance['rss']) ? (bool) $instance['rss'] :false;
$link_cats = get_terms('types', array('hide_empty' => 1));
$lost_sts = get_terms('status', array('hide_empty' => 1));
$items = array('1','2','3','4','5');
?>
/>
__('ADA Lost Pets', 'ADA'),'description' => _x('Display lost pets and help find them','widget pet','ADA')));;
}
/** @see WP_Widget::widget */
function widget($args, $instance) {
extract( $args );
$title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title'], $instance, $this->id_base);
$text = apply_filters( 'widget_text', $instance['text'], $instance );
$sortby = empty( $instance['sortby'] ) ? 'comment_count' : $instance['sortby'];
$r = $instance['rss'] ? '1' : '0';
$status = isset($instance['status']) ? $instance['status'] : false;
$number = isset($instance['number']) ? $instance['number'] : false;
$category = isset($instance['category']) ? $instance['category'] : false;
$q = new WP_Query(array('post_type'=>'lost', 'posts_per_page'=>$number, 'orderby'=>$sortby, 'lost-status' => $status,'lost-types' => $category));
?>
id_base);
$instance = wp_parse_args( (array) $instance, array( 'text' => '', 'sortby' => 'comment_count','category' => false,'status' => false, 'number'=> false ) );
$text = esc_textarea($instance['text']);
$rss = isset($instance['rss']) ? (bool) $instance['rss'] :false;
$link_cats = get_terms('lost-types', array('hide_empty' => 1));
$lost_sts = get_terms('lost-status', array('hide_empty' => 1));
$items = array('1','2','3','4','5');
?>
/>