Changeset 25065
- Timestamp:
- 08/20/2013 05:52:22 PM (12 years ago)
- Location:
- trunk/src/wp-content/themes/twentyfourteen
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfourteen/footer.php
r25021 r25065 12 12 </div><!-- #main --> 13 13 14 <?php get_sidebar( 'footer' ); ?>15 14 16 15 <footer id="colophon" class="site-footer" role="contentinfo"> 16 17 <?php get_sidebar( 'footer' ); ?> 18 17 19 <div class="site-info"> 18 20 <?php do_action( 'twentyfourteen_credits' ); ?> 19 <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twenty thirteen' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentythirteen' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentythirteen' ), 'WordPress' ); ?></a>21 <a href="<?php echo esc_url( __( 'http://wordpress.org/', 'twentyfourteen' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentyfourteen' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentyfourteen' ), 'WordPress' ); ?></a> 20 22 </div><!-- .site-info --> 21 23 </footer><!-- #colophon --> -
trunk/src/wp-content/themes/twentyfourteen/functions.php
r25064 r25065 143 143 ) ); 144 144 register_sidebar( array( 145 'name' => __( 'Footer Widget Area One', 'twentyfourteen' ),145 'name' => __( 'Footer Widget Area', 'twentyfourteen' ), 146 146 'id' => 'sidebar-3', 147 147 'before_widget' => '<aside id="%1$s" class="widget %2$s">', … … 150 150 'after_title' => '</h1>', 151 151 ) ); 152 register_sidebar( array(153 'name' => __( 'Footer Widget Area Two', 'twentyfourteen' ),154 'id' => 'sidebar-4',155 'before_widget' => '<aside id="%1$s" class="widget %2$s">',156 'after_widget' => '</aside>',157 'before_title' => '<h1 class="widget-title">',158 'after_title' => '</h1>',159 ) );160 register_sidebar( array(161 'name' => __( 'Footer Widget Area Three', 'twentyfourteen' ),162 'id' => 'sidebar-5',163 'before_widget' => '<aside id="%1$s" class="widget %2$s">',164 'after_widget' => '</aside>',165 'before_title' => '<h1 class="widget-title">',166 'after_title' => '</h1>',167 ) );168 register_sidebar( array(169 'name' => __( 'Footer Widget Area Four', 'twentyfourteen' ),170 'id' => 'sidebar-6',171 'before_widget' => '<aside id="%1$s" class="widget %2$s">',172 'after_widget' => '</aside>',173 'before_title' => '<h1 class="widget-title">',174 'after_title' => '</h1>',175 ) );176 register_sidebar( array(177 'name' => __( 'Footer Widget Area Five', 'twentyfourteen' ),178 'id' => 'sidebar-7',179 'before_widget' => '<aside id="%1$s" class="widget %2$s">',180 'after_widget' => '</aside>',181 'before_title' => '<h1 class="widget-title">',182 'after_title' => '</h1>',183 ) );184 152 } 185 153 add_action( 'widgets_init', 'twentyfourteen_widgets_init' ); … … 213 181 if ( is_singular() && wp_attachment_is_image() ) 214 182 wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' ); 183 184 if ( is_active_sidebar( 'sidebar-3' ) ) 185 wp_enqueue_script( 'jquery-masonry' ); 215 186 216 187 wp_enqueue_script( 'twentyfourteen-theme', get_template_directory_uri() . '/js/theme.js', array( 'jquery' ), '20130820', true ); … … 332 303 333 304 /** 334 * Count the number of footer sidebars to enable dynamic classes for the footer335 *336 */337 function twentyfourteen_footer_sidebar_class() {338 $count = 0;339 340 if ( is_active_sidebar( 'sidebar-3' ) )341 $count++;342 343 if ( is_active_sidebar( 'sidebar-4' ) )344 $count++;345 346 if ( is_active_sidebar( 'sidebar-5' ) )347 $count++;348 349 if ( is_active_sidebar( 'sidebar-6' ) )350 $count++;351 352 if ( is_active_sidebar( 'sidebar-7' ) )353 $count++;354 355 $class = '';356 357 switch ( $count ) {358 case '1':359 $class = 'one';360 break;361 case '2':362 $class = 'two';363 break;364 case '3':365 $class = 'three';366 break;367 case '4':368 $class = 'four';369 break;370 case '5':371 $class = 'five';372 break;373 }374 375 if ( $class )376 printf( 'class="%s"', $class );377 }378 379 /**380 305 * Gets recent formatted posts that are not featured in FC plugin. 381 306 * -
trunk/src/wp-content/themes/twentyfourteen/js/theme.js
r25064 r25065 126 126 } ); 127 127 128 // Arranges footer widgets vertically. 129 if ( $.isFunction( $.fn.masonry ) ) { 130 131 $( '#footer-sidebar' ).masonry( { 132 itemSelector: '.widget', 133 columnWidth: 225, 134 gutterWidth: 27, 135 isRTL: $( 'body' ).is( '.rtl' ) 136 } ); 137 } 138 128 139 } ); 129 140 -
trunk/src/wp-content/themes/twentyfourteen/sidebar-footer.php
r24832 r25065 1 1 <?php 2 2 /** 3 * The Sidebar containing the main widget area s.3 * The Sidebar containing the main widget area. 4 4 * 5 5 * @package WordPress … … 8 8 ?> 9 9 <?php 10 if ( ! is_active_sidebar( 'sidebar-3' ) 11 && ! is_active_sidebar( 'sidebar-4' ) 12 && ! is_active_sidebar( 'sidebar-5' ) 13 && ! is_active_sidebar( 'sidebar-6' ) 14 && ! is_active_sidebar( 'sidebar-7' ) 15 ) 16 return; 10 if ( ! is_active_sidebar( 'sidebar-3' ) ) 11 return; 17 12 ?> 18 <div id="supplementary" <?php twentyfourteen_footer_sidebar_class(); ?>> 13 <div id="supplementary"> 14 19 15 <?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?> 20 <div id="footer-sidebar -one" class="widget-area" role="complementary">16 <div id="footer-sidebar" class="widget-area" role="complementary"> 21 17 <?php dynamic_sidebar( 'sidebar-3' ); ?> 22 </div><!-- #f irst .widget-area-->18 </div><!-- #footer-sidebar --> 23 19 <?php endif; ?> 24 20 25 <?php if ( is_active_sidebar( 'sidebar-4' ) ) : ?>26 <div id="footer-sidebar-two" class="widget-area" role="complementary">27 <?php dynamic_sidebar( 'sidebar-4' ); ?>28 </div><!-- #second .widget-area -->29 <?php endif; ?>30 31 <?php if ( is_active_sidebar( 'sidebar-5' ) ) : ?>32 <div id="footer-sidebar-three" class="widget-area" role="complementary">33 <?php dynamic_sidebar( 'sidebar-5' ); ?>34 </div><!-- #third .widget-area -->35 <?php endif; ?>36 37 <?php if ( is_active_sidebar( 'sidebar-6' ) ) : ?>38 <div id="footer-sidebar-four" class="widget-area" role="complementary">39 <?php dynamic_sidebar( 'sidebar-6' ); ?>40 </div><!-- #fourth .widget-area -->41 <?php endif; ?>42 <?php if ( is_active_sidebar( 'sidebar-7' ) ) : ?>43 <div id="footer-sidebar-five" class="widget-area" role="complementary">44 <?php dynamic_sidebar( 'sidebar-7' ); ?>45 </div><!-- #fourth .widget-area -->46 <?php endif; ?>47 21 </div><!-- #supplementary --> -
trunk/src/wp-content/themes/twentyfourteen/style.css
r25063 r25065 2340 2340 ----------------------------------------------- */ 2341 2341 2342 #supplementary.widget-area {2342 .site-footer .widget-area { 2343 2343 -moz-box-sizing: border-box; 2344 2344 box-sizing: border-box; 2345 } 2346 .site-footer .widget { 2347 float: left; 2348 padding-left: 27px; 2349 width: 198px; 2345 2350 } 2346 2351 … … 2997 3002 padding-left: 0; 2998 3003 } 2999 #supplementary .widget-area { 3000 float: left; 3001 padding: 0 27px; 3002 padding: 0 2.7rem; 3003 } 3004 #supplementary.one .widget-area { 3005 width: 100%; 3006 } 3007 #supplementary.two .widget-area { 3008 width: 50%; 3009 } 3010 #supplementary.three .widget-area { 3011 width: 33.33333333%; 3012 } 3013 #supplementary.four .widget-area { 3014 width: 25%; 3015 } 3016 #supplementary.five .widget-area { 3017 width: 20%; 3018 } 3004 3019 3005 } 3020 3006
Note: See TracChangeset
for help on using the changeset viewer.