%2$s photo.', 'This gallery contains %2$s photos.', $total_images, 'almasi' ), esc_url( get_permalink() ), number_format_i18n( $total_images ) ); ?>
→', 'almasi' ) ); endif; ?>'widget_almasi_ephemera', 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts', 'almasi' ), ) ); /* * @todo http://core.trac.wordpress.org/ticket/23257: Add plural versions of Post Format strings */ $this->format_strings = array( 'aside' => __( 'Asides', 'almasi' ), 'image' => __( 'Images', 'almasi' ), 'video' => __( 'Videos', 'almasi' ), 'audio' => __( 'Audio', 'almasi' ), 'quote' => __( 'Quotes', 'almasi' ), 'link' => __( 'Links', 'almasi' ), 'gallery' => __( 'Galleries', 'almasi' ), ); } /** * Output the HTML for this widget. * * @access public * @since Almasi 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, 'almasi' ), esc_url( get_permalink() ), number_format_i18n( $total_images ) ); ?>
→', 'almasi' ) ); endif; ?>
'widget_almasi_recent_posts', 'description' => __('Almasi - Recent Posts (Widescope Thumbs). Can be used for the sidebar and as an alternative to the Showcase Widget.','almasi') ); $this->WP_Widget( 'almasi-recent-posts', __('Almasi - Recent Posts','almasi'), $widget_ops); } /** @see WP_Widget::widget */ function widget($args, $instance) { extract( $args ); $title = apply_filters('widget_title', empty($instance['title']) ? __('Almasi Recent Posts','almasi') : $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; ?>