%2$s photo.', 'This gallery contains %2$s photos.', $total_images, 'ridizain' ), esc_url( get_permalink() ), number_format_i18n( $total_images ) ); ?>
→', 'ridizain' ) ); endif; ?>'widget_ridizain_ephemera', 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts', 'ridizain' ), ) ); /* * @todo http://core.trac.wordpress.org/ticket/23257: Add plural versions of Post Format strings */ $this->format_strings = array( 'aside' => __( 'Asides', 'ridizain' ), 'image' => __( 'Images', 'ridizain' ), 'video' => __( 'Videos', 'ridizain' ), 'audio' => __( 'Audio', 'ridizain' ), 'quote' => __( 'Quotes', 'ridizain' ), 'link' => __( 'Links', 'ridizain' ), 'gallery' => __( 'Galleries', 'ridizain' ), ); } /** * Output the HTML for this widget. * * @access public * @since Ridizain 1.0 * * @param array $args An array of standard parameters for widgets in this theme. * @param array $instance An array of settings for this widget instance. * @return void Echoes its output. */ public function widget( $args, $instance ) { $format = $instance['format']; $number = empty( $instance['number'] ) ? 2 : absint( $instance['number'] ); $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? $this->format_strings[ $format ] : $instance['title'], $instance, $this->id_base ); $ephemera = new WP_Query( array( 'order' => 'DESC', 'posts_per_page' => $number, 'no_found_rows' => true, 'post_status' => 'publish', 'post__not_in' => get_option( 'sticky_posts' ), 'tax_query' => array( array( 'taxonomy' => 'post_format', 'terms' => array( "post-format-$format" ), 'field' => 'slug', 'operator' => 'IN', ), ), ) ); if ( $ephemera->have_posts() ) : $tmp_content_width = $GLOBALS['content_width']; $GLOBALS['content_width'] = 370; echo $args['before_widget']; ?>
%2$s photo.', 'This gallery contains %2$s photos.', $total_images, 'ridizain' ), esc_url( get_permalink() ), number_format_i18n( $total_images ) ); ?>
→', 'ridizain' ) ); endif; ?>
'widget_ridizain_recent_posts', 'description' => __('Ridizain - Recent Posts (Widescope Thumbs). Can be used for the sidebar and as an alternative to the Showcase Widget.','ridizain') ); $this->WP_Widget( 'ridizain-recent-posts', __('Ridizain - Recent Posts','ridizain'), $widget_ops); } /** @see WP_Widget::widget */ function widget($args, $instance) { extract( $args ); $title = apply_filters('widget_title', empty($instance['title']) ? __('Ridizain Recent Posts','ridizain') : $instance['title']); $category = apply_filters('widget_category', $instance['category']); $showpost = apply_filters('widget_showpost', $instance['showpost']); $disabletitle = apply_filters('widget_disabletitle', isset($instance['disabletitle'])); $disabledate = apply_filters('widget_disabledate', isset($instance['disabledate'])); $disableexcerpt = apply_filters('widget_disabledate', isset($instance['disableexcerpt'])); $disablethumb = apply_filters('widget_disablethumb', isset($instance['disablethumb'])); $disablereadmore = apply_filters('widget_disablereadmore', isset($instance['disablereadmore'])); $instance['category'] = esc_attr(isset($instance['category'])? $instance['category'] : ""); global $wp_query; ?>