- %2$s photo.', 'This gallery contains %2$s photos.', $total_images, 'twentyfourteen' ), - esc_url( get_permalink() ), - number_format_i18n( $total_images ) - ); - ?> -
- →', 'twentyfourteen' ) ); - endif; - ?> -X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/256a3b381f63716209b3527d0a14442ae570c283..16e7b37c7914d753890c1a05a9335f3b43751eb8:/wp-content/themes/twentyfourteen/inc/widgets.php?ds=sidebyside diff --git a/wp-content/themes/twentyfourteen/inc/widgets.php b/wp-content/themes/twentyfourteen/inc/widgets.php deleted file mode 100644 index f78effed..00000000 --- a/wp-content/themes/twentyfourteen/inc/widgets.php +++ /dev/null @@ -1,250 +0,0 @@ - 'widget_twentyfourteen_ephemera', - 'description' => __( 'Use this widget to list your recent Aside, Quote, Video, Audio, Image, Gallery, and Link posts', 'twentyfourteen' ), - ) ); - - /* - * @todo http://core.trac.wordpress.org/ticket/23257: Add plural versions of Post Format strings - */ - $this->format_strings = array( - 'aside' => __( 'Asides', 'twentyfourteen' ), - 'image' => __( 'Images', 'twentyfourteen' ), - 'video' => __( 'Videos', 'twentyfourteen' ), - 'audio' => __( 'Audio', 'twentyfourteen' ), - 'quote' => __( 'Quotes', 'twentyfourteen' ), - 'link' => __( 'Links', 'twentyfourteen' ), - 'gallery' => __( 'Galleries', 'twentyfourteen' ), - ); - } - - /** - * Output the HTML for this widget. - * - * @access public - * @since Twenty Fourteen 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'] = 306; - - echo $args['before_widget']; - ?> -
- %2$s photo.', 'This gallery contains %2$s photos.', $total_images, 'twentyfourteen' ), - esc_url( get_permalink() ), - number_format_i18n( $total_images ) - ); - ?> -
- →', 'twentyfourteen' ) ); - endif; - ?> --
- --
- -- -