diff --git a/src/wp-content/themes/twentyfourteen/footer.php b/src/wp-content/themes/twentyfourteen/footer.php
index a5108b8ffe..056c79e071 100644
--- a/src/wp-content/themes/twentyfourteen/footer.php
+++ b/src/wp-content/themes/twentyfourteen/footer.php
@@ -11,12 +11,14 @@
-
diff --git a/src/wp-content/themes/twentyfourteen/functions.php b/src/wp-content/themes/twentyfourteen/functions.php
index 7e488aee50..2d9a5b3765 100644
--- a/src/wp-content/themes/twentyfourteen/functions.php
+++ b/src/wp-content/themes/twentyfourteen/functions.php
@@ -142,45 +142,13 @@ function twentyfourteen_widgets_init() {
'after_title' => '',
) );
register_sidebar( array(
- 'name' => __( 'Footer Widget Area One', 'twentyfourteen' ),
+ 'name' => __( 'Footer Widget Area', 'twentyfourteen' ),
'id' => 'sidebar-3',
'before_widget' => '',
'before_title' => '
',
) );
- register_sidebar( array(
- 'name' => __( 'Footer Widget Area Two', 'twentyfourteen' ),
- 'id' => 'sidebar-4',
- 'before_widget' => '',
- 'before_title' => '',
- ) );
- register_sidebar( array(
- 'name' => __( 'Footer Widget Area Three', 'twentyfourteen' ),
- 'id' => 'sidebar-5',
- 'before_widget' => '',
- 'before_title' => '',
- ) );
- register_sidebar( array(
- 'name' => __( 'Footer Widget Area Four', 'twentyfourteen' ),
- 'id' => 'sidebar-6',
- 'before_widget' => '',
- 'before_title' => '',
- ) );
- register_sidebar( array(
- 'name' => __( 'Footer Widget Area Five', 'twentyfourteen' ),
- 'id' => 'sidebar-7',
- 'before_widget' => '',
- 'before_title' => '',
- ) );
}
add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
@@ -213,6 +181,9 @@ function twentyfourteen_scripts() {
if ( is_singular() && wp_attachment_is_image() )
wp_enqueue_script( 'twentyfourteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20130402' );
+ if ( is_active_sidebar( 'sidebar-3' ) )
+ wp_enqueue_script( 'jquery-masonry' );
+
wp_enqueue_script( 'twentyfourteen-theme', get_template_directory_uri() . '/js/theme.js', array( 'jquery' ), '20130820', true );
}
add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
@@ -330,52 +301,6 @@ function twentyfourteen_the_attached_image() {
}
endif;
-/**
- * Count the number of footer sidebars to enable dynamic classes for the footer
- *
- */
-function twentyfourteen_footer_sidebar_class() {
- $count = 0;
-
- if ( is_active_sidebar( 'sidebar-3' ) )
- $count++;
-
- if ( is_active_sidebar( 'sidebar-4' ) )
- $count++;
-
- if ( is_active_sidebar( 'sidebar-5' ) )
- $count++;
-
- if ( is_active_sidebar( 'sidebar-6' ) )
- $count++;
-
- if ( is_active_sidebar( 'sidebar-7' ) )
- $count++;
-
- $class = '';
-
- switch ( $count ) {
- case '1':
- $class = 'one';
- break;
- case '2':
- $class = 'two';
- break;
- case '3':
- $class = 'three';
- break;
- case '4':
- $class = 'four';
- break;
- case '5':
- $class = 'five';
- break;
- }
-
- if ( $class )
- printf( 'class="%s"', $class );
-}
-
/**
* Gets recent formatted posts that are not featured in FC plugin.
*
diff --git a/src/wp-content/themes/twentyfourteen/js/theme.js b/src/wp-content/themes/twentyfourteen/js/theme.js
index 719540d864..e895a662ed 100644
--- a/src/wp-content/themes/twentyfourteen/js/theme.js
+++ b/src/wp-content/themes/twentyfourteen/js/theme.js
@@ -125,6 +125,17 @@
}
} );
+ // Arranges footer widgets vertically.
+ if ( $.isFunction( $.fn.masonry ) ) {
+
+ $( '#footer-sidebar' ).masonry( {
+ itemSelector: '.widget',
+ columnWidth: 225,
+ gutterWidth: 27,
+ isRTL: $( 'body' ).is( '.rtl' )
+ } );
+ }
+
} );
} )( jQuery );
\ No newline at end of file
diff --git a/src/wp-content/themes/twentyfourteen/sidebar-footer.php b/src/wp-content/themes/twentyfourteen/sidebar-footer.php
index e01e8b97f5..c66a97bbc1 100644
--- a/src/wp-content/themes/twentyfourteen/sidebar-footer.php
+++ b/src/wp-content/themes/twentyfourteen/sidebar-footer.php
@@ -1,47 +1,21 @@
->
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/wp-content/themes/twentyfourteen/style.css b/src/wp-content/themes/twentyfourteen/style.css
index baeb7837f0..f34a912e01 100644
--- a/src/wp-content/themes/twentyfourteen/style.css
+++ b/src/wp-content/themes/twentyfourteen/style.css
@@ -2339,10 +2339,15 @@ span > object {
/* =Footer Sidebar
----------------------------------------------- */
-#supplementary .widget-area {
+.site-footer .widget-area {
-moz-box-sizing: border-box;
box-sizing: border-box;
}
+.site-footer .widget {
+ float: left;
+ padding-left: 27px;
+ width: 198px;
+}
/* =Media Queries
----------------------------------------------- */
@@ -2996,26 +3001,7 @@ span > object {
padding-right: 0;
padding-left: 0;
}
- #supplementary .widget-area {
- float: left;
- padding: 0 27px;
- padding: 0 2.7rem;
- }
- #supplementary.one .widget-area {
- width: 100%;
- }
- #supplementary.two .widget-area {
- width: 50%;
- }
- #supplementary.three .widget-area {
- width: 33.33333333%;
- }
- #supplementary.four .widget-area {
- width: 25%;
- }
- #supplementary.five .widget-area {
- width: 20%;
- }
+
}
@media screen and (min-width: 1150px) {