__( "Your most used tags in cloud format", 'amanda-lite') ); parent::__construct('tag_cloud', __('Amanda Tag Cloud', 'amanda-lite'), $widget_ops); } function widget( $args, $instance ) { extract($args); $current_taxonomy = $this->_get_current_taxonomy($instance); if ( !empty($instance['title']) ) { $title = $instance['title']; } else { if ( 'post_tag' == $current_taxonomy ) { $title = __('Tags', 'amanda-lite'); } else { $tax = get_taxonomy($current_taxonomy); $title = $tax->labels->name; } } $title = apply_filters('widget_title', $title, $instance, $this->id_base); echo $before_widget; if ( $title ){ echo $before_title . esc_attr($title) . $after_title; } echo '
'Contact Info widget') ); } function widget( $args, $instance ) { extract($args); $title = apply_filters( 'widget_title', esc_attr( $instance['title'] ) ); $address = apply_filters( 'widget_text', esc_attr( $instance['address'] ) ); $phone = apply_filters( 'widget_text', esc_attr( $instance['phone'] ) ); $mobile = apply_filters( 'widget_text', esc_attr( $instance['mobile'] ) ); $fax = apply_filters( 'widget_text', esc_attr( $instance['fax'] ) ); $email = apply_filters( 'widget_text', esc_attr( $instance['email'] ) ); ?>
'Social Networks widget') ); } function widget( $args, $instance ) { extract($args); $title = apply_filters( 'widget_title', esc_attr( $instance['title'] ) ); ?>
'Flickr Stream' , 'flickr_id' => '' , 'limit' => '6') ); } function widget( $args, $instance ) { extract($args); $title = apply_filters( 'widget_title', $instance['title'] ); $flickr_id = apply_filters( 'flickr_id', $instance['flickr_id'] ); $limit = apply_filters( 'limit', $instance['limit'] ); wp_enqueue_script('jflickrfeed', get_template_directory_uri() . '/js/jflickrfeed.min.js', array( 'jquery' ), '1' ); ?>
'widget_recent_entries recent-posts-widget', 'description' => __( "The most recent posts on your site", 'amanda-lite') ); parent::__construct('amanda-recent-posts', __('Amanda Recent Posts', 'amanda-lite'), $widget_ops); $this->alt_option_name = 'widget_recent_entries'; } function widget($args, $instance) { $cache = wp_cache_get('widget_recent_posts', 'widget'); if ( !is_array($cache) ) $cache = array(); if ( ! isset( $args['widget_id'] ) ) $args['widget_id'] = $this->id; if ( isset( $cache[ $args['widget_id'] ] ) ) { echo $cache[ $args['widget_id'] ]; return; } ob_start(); extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? __('Recent Posts', 'amanda-lite') : $instance['title'], $instance, $this->id_base); if ( empty( $instance['number'] ) || ! $number = absint( $instance['number'] ) ) $number = 10; $show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false; $show_thumbnail = isset( $instance['show_thumbnail'] ) ? $instance['show_thumbnail'] : false; $col_content = ''; if( $show_thumbnail ) { $col_content = 'col-xs-10'; } $r = new WP_Query( apply_filters( 'widget_posts_args', array( 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true ) ) ); if ($r->have_posts()) : ?>
id="get_field_id( 'show_date' ); ?>" name="get_field_name( 'show_date' ); ?>" />
id="get_field_id( 'show_thumbnail' ); ?>" name="get_field_name( 'show_thumbnail' ); ?>" />
'widget_popular_entries popular-posts-widget', 'description' => __( "The most popular posts on your site", 'amanda-lite') ); parent::__construct('amanda-popular-posts', __('Amanda Popular Posts', 'amanda-lite'), $widget_ops); $this->alt_option_name = 'widget_popular_entries'; } function widget($args, $instance) { $cache = wp_cache_get('widget_popular_posts', 'widget'); if ( !is_array($cache) ) $cache = array(); if ( ! isset( $args['widget_id'] ) ) $args['widget_id'] = $this->id; if ( isset( $cache[ $args['widget_id'] ] ) ) { echo $cache[ $args['widget_id'] ]; return; } ob_start(); extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? __('Popular Posts', 'amanda-lite') : $instance['title'], $instance, $this->id_base); if ( empty( $instance['number'] ) || ! $number = absint( $instance['number'] ) ) $number = 10; $show_date = isset( $instance['show_date'] ) ? $instance['show_date'] : false; $show_thumbnail = isset( $instance['show_thumbnail'] ) ? $instance['show_thumbnail'] : false; $col_content = ''; if( $show_thumbnail ) { $col_content = 'col-xs-10'; } // $r = new WP_Query( apply_filters( 'widget_posts_args', array( 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true ) ) ); $r = new WP_Query( apply_filters( 'widget_posts_args', array( 'posts_per_page' => $number, 'meta_key' => 'wpb_post_views_count', 'orderby' => 'meta_value_num', 'order' => 'DESC', 'no_found_rows' => true, 'post_status' => 'publish', 'ignore_sticky_posts' => true ) ) ); if ($r->have_posts()) : ?>
id="get_field_id( 'show_date' ); ?>" name="get_field_name( 'show_date' ); ?>" />
id="get_field_id( 'show_thumbnail' ); ?>" name="get_field_name( 'show_thumbnail' ); ?>" />