Changeset 26225
- Timestamp:
- 11/15/2013 09:14:49 PM (10 years ago)
- Location:
- trunk/src/wp-content/themes/twentyfourteen
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/functions.php
r26218 r26225 34 34 if ( ! isset( $content_width ) ) 35 35 $content_width = 474; 36 37 /** 38 * Twenty Fourteen only works in WordPress 3.6 or later. 39 */ 40 if ( version_compare( $GLOBALS['wp_version'], '3.6', '<' ) ) 41 require get_template_directory() . '/inc/back-compat.php'; 36 42 37 43 if ( ! function_exists( 'twentyfourteen_setup' ) ) : … … 218 224 */ 219 225 function twentyfourteen_scripts() { 220 global $wp_styles;221 222 226 // Add Lato font, used in the main stylesheet. 223 227 wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null ); … … 231 235 // Load the Internet Explorer specific stylesheet. 232 236 wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style' ), '20131110' ); 233 $wp_styles->add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' );237 wp_style_add_data( 'twentyfourteen-ie', 'conditional', 'lt IE 9' ); 234 238 235 239 if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) -
trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php
r26154 r26225 132 132 $images = array(); 133 133 134 if ( function_exists( 'get_post_galleries' ) ) { 135 $galleries = get_post_galleries( get_the_ID(), false ); 136 if ( isset( $galleries[0]['ids'] ) ) 137 $images = explode( ',', $galleries[0]['ids'] ); 138 } else { 139 $pattern = get_shortcode_regex(); 140 preg_match( "/$pattern/s", get_the_content(), $match ); 141 $atts = shortcode_parse_atts( $match[3] ); 142 if ( isset( $atts['ids'] ) ) 143 $images = explode( ',', $atts['ids'] ); 144 } 134 $galleries = get_post_galleries( get_the_ID(), false ); 135 if ( isset( $galleries[0]['ids'] ) ) 136 $images = explode( ',', $galleries[0]['ids'] ); 145 137 146 138 if ( ! $images ) : 147 139 $images = get_posts( array( 148 140 'fields' => 'ids', 149 'numberposts' => 999,141 'numberposts' => -1, 150 142 'order' => 'ASC', 151 143 'orderby' => 'menu_order', … … 167 159 if ( ! empty ( $post_thumbnail ) ) : 168 160 ?> 169 <a href="<?php the_permalink(); ?>"><?php echo $post_thumbnail; ?></a> 170 <?php 171 endif; 172 ?> 173 <p class="wp-caption-text"> 174 <?php 175 printf( _n( 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photo</a>.', 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photos</a>.', $total_images, 'twentyfourteen' ), 176 esc_url( get_permalink() ), 177 number_format_i18n( $total_images ) 178 ); 179 ?> 180 </p> 161 <a href="<?php the_permalink(); ?>"><?php echo $post_thumbnail; ?></a> 162 <?php endif; ?> 163 <p class="wp-caption-text"> 181 164 <?php 165 printf( _n( 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photo</a>.', 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photos</a>.', $total_images, 'twentyfourteen' ), 166 esc_url( get_permalink() ), 167 number_format_i18n( $total_images ) 168 ); 169 ?> 170 </p> 171 <?php 182 172 endif; 183 173
Note: See TracChangeset
for help on using the changeset viewer.