+
` section of your document, and contains the compiled styles for your project.
-* `assets/javascript/vendor`: Vendor scripts are copied from `assets/components/` to this directory. We use this path for enqueing the vendor scripts in WordPress.
+If you're new to Sass, please note that you need to have Gulp running in the background (``npm start``), for any changes in your scss files to be compiled to `app.css`.
-### Check For WordPress Coding Standards
+### JavaScript Compilation
-Foundation comes with everything you need to run tests that will check your theme for WordPress Coding Standards. To enable this feature you'll need to install PHP Codesniffer, along with the WordPress Coding Standards set of "Sniffs". You'll need to have [Composer](https://getcomposer.org/) To install both run the following:
-```bash
-$ composer create-project wp-coding-standards/wpcs:dev-master --no-dev
-```
-When prompted to remove existing VCS, answer Yes by typing `Y`.
+All JavaScript files in the `src/assets/js` folder, along ith Foundation and its dependencies, are bundled into one file called `app.js`. The files are imported using module dependency with [webpack](https://webpack.js.org/) as the module bundler.
-Once you have installed the packages, you can check your entire theme by running:
-```bash
-$ npm run phpcs
-```
+If you're unfamiliar with modules and module bundling, check out [this resource for node style require/exports](http://openmymind.net/2012/2/3/Node-Require-and-Exports/) and [this resource to understand ES6 modules](http://exploringjs.com/es6/ch_modules.html).
-If there are errors that Code Sniffer can fix automatically, run the following command to fix them:
-```bash
-$ npm run phpcbf
-```
+Foundation modules are loaded in the `src/assets/js/app.js` file. By default all components are loaded. You can also pick and choose which modules to include. Just follow the instructions in the file.
## Demo
* [Clean FoundationPress install](http://foundationpress.olefredrik.com/)
* [FoundationPress Kitchen Sink - see every single element in action](http://foundationpress.olefredrik.com/kitchen-sink/)
-## Unit Testing With Travis-CI
-
-FoundationPress is completely ready to be deployed to and tested by Travis-CI for WordPress Coding Standards and best practices. All you need to do to activate the test is sign up and follow the instructions to point Travis-CI towards your repo. Just don't forget to update the status badge to point to your repositories unit test.
-[Travis-CI](https://travis-ci.org/)
-
## UI toolkits for rapid prototyping
* [Foundation UI Kit for Axure RP](https://gumroad.com/l/foundation-ui-kit-axure-rp)
-* [FoundationPSD - Foundation UI Kit for Photoshop](http://foundationpress.olefredrik.com/downloads/foundation-psd-template/)
+* [FoundationXD - Foundation UI Kit for Adobe XD](https://gumroad.com/l/foundation-ui-kit-xd)
+* [FoundationPSD - Foundation UI Kit for Photoshop](https://gumroad.com/l/foundation-ui-kit-psd)
## Tutorials
* [FoundationPress for beginners](https://foundationpress.olefredrik.com/posts/tutorials/foundationpress-for-beginners/)
* [Responsive images in WordPress with Interchange](http://rachievee.com/responsive-images-in-wordpress/)
-* [Build a Responsive WordPress theme](http://www.webdesignermag.co.uk/build-a-responsive-wordpress-theme/)
* [Learn to use the _settings file to change almost every aspect of a Foundation site](http://zurb.com/university/lessons/66)
* [Other lessons from Zurb University](http://zurb.com/university/past-lessons)
@@ -136,7 +113,6 @@ FoundationPress is completely ready to be deployed to and tested by Travis-CI fo
* [Le saint](http://www.lesaint.ca/)
* [Help blog](http://help.com/blog/)
* [Maren Schmidt](http://marenschmidt.com/)
-* [Ciancimino Gallery](http://ciancimino.com/)
* [The Rainbow Venues](http://www.therainbowvenues.co.uk/)
* [Ameronix](http://www.ameronix.com/)
* [Finnerodja](http://www.finnerodja.se/)
@@ -152,6 +128,19 @@ FoundationPress is completely ready to be deployed to and tested by Travis-CI fo
* [Axe](http://www.axe.be/)
* [ProfitGym](http://profitgym.nl/)
* [Dr Now](http://www.drnow.com/)
+* [Agritur Piasina](http://www.agriturpiasina.it/)
+* [Atomic Interactive](http://atomicinteractive.com/)
+* [Byington Vineyard & Winery](http://byington.com/)
+* [Philanthropy House](http://philanthropyhouse.eu/)
+* [TVA Group](http://www.groupe-tva.com/en/)
+* [Forte Science](https://www.forte-science.co.jp/)
+* [Well Made Studio](http://wellmadestudio.com/)
+* [Show And Tell](http://www.showandtelluk.com/)
+* [Wahl + Case](https://www.wahlandcase.com/)
+* [Forefront Dermatology](https://forefrontdermatology.com/)
+* [Wirthschaftsjunioren](http://www.wirtschaftsjunioren.org/)
+* [Morgridge Institute for Research](https://morgridge.org)
+
>Credit goes to all the brilliant designers and developers out there. Have **you** made a site that should be on this list? [Please let me know](https://twitter.com/olefredrik)
diff --git a/archive.php b/archive.php
old mode 100755
new mode 100644
index 4b6113f05..41523cbc8
--- a/archive.php
+++ b/archive.php
@@ -17,7 +17,7 @@
get_header(); ?>
-
', $paginate_links );
@@ -35,9 +35,7 @@ function foundationpress_pagination() {
// Display the pagination if more than one page is found.
if ( $paginate_links ) {
- echo '
';
echo $paginate_links;
- echo '
';
}
}
endif;
@@ -49,24 +47,26 @@ function foundationpress_pagination() {
if ( ! function_exists( 'foundationpress_menu_fallback' ) ) :
function foundationpress_menu_fallback() {
echo '
';
- // Translators 1: Link to Menus, 2: Link to Customize.
- printf( __( 'Please assign a menu to the primary menu location under %1$s or %2$s the design.', 'foundationpress' ),
- sprintf( __( 'Menus', 'foundationpress' ),
- get_admin_url( get_current_blog_id(), 'nav-menus.php' )
- ),
- sprintf( __( 'Customize', 'foundationpress' ),
- get_admin_url( get_current_blog_id(), 'customize.php' )
- )
- );
- echo '
';
+ /* translators: %1$s: link to menus, %2$s: link to customize. */
+ printf( __( 'Please assign a menu to the primary menu location under %1$s or %2$s the design.', 'foundationpress' ),
+ /* translators: %s: menu url */
+ sprintf( __( 'Menus', 'foundationpress' ),
+ get_admin_url( get_current_blog_id(), 'nav-menus.php' )
+ ),
+ /* translators: %s: customize url */
+ sprintf( __( 'Customize', 'foundationpress' ),
+ get_admin_url( get_current_blog_id(), 'customize.php' )
+ )
+ );
+ echo '
';
}
endif;
-// Add Foundation 'active' class for the current menu item.
+// Add Foundation 'is-active' class for the current menu item.
if ( ! function_exists( 'foundationpress_active_nav_class' ) ) :
function foundationpress_active_nav_class( $classes, $item ) {
- if ( 1 == $item->current || true == $item->current_item_ancestor ) {
- $classes[] = 'active';
+ if ( $item->current == 1 || $item->current_item_ancestor == true ) {
+ $classes[] = 'is-active';
}
return $classes;
}
@@ -74,14 +74,14 @@ function foundationpress_active_nav_class( $classes, $item ) {
endif;
/**
- * Use the active class of ZURB Foundation on wp_list_pages output.
+ * Use the is-active class of ZURB Foundation on wp_list_pages output.
* From required+ Foundation http://themes.required.ch.
*/
if ( ! function_exists( 'foundationpress_active_list_pages_class' ) ) :
function foundationpress_active_list_pages_class( $input ) {
$pattern = '/current_page_item/';
- $replace = 'current_page_item active';
+ $replace = 'current_page_item is-active';
$output = preg_replace( $pattern, $replace, $input );
@@ -90,101 +90,94 @@ function foundationpress_active_list_pages_class( $input ) {
add_filter( 'wp_list_pages', 'foundationpress_active_list_pages_class', 10, 2 );
endif;
-if ( ! class_exists( 'Foundationpress_Comments' ) ) :
-class Foundationpress_Comments extends Walker_Comment{
-
- // Init classwide variables.
- var $tree_type = 'comment';
- var $db_fields = array( 'parent' => 'comment_parent', 'id' => 'comment_ID' );
-
- /** CONSTRUCTOR
- * You'll have to use this if you plan to get to the top of the comments list, as
- * start_lvl() only goes as high as 1 deep nested comments */
- function __construct() { ?>
-
-
“”
-
-
-
-
-
-
-
-
-
-
-
-
id="comment-">
-
-
-
-
-
-
-
-
-
-
- %s', 'foundationpress' ), get_comment_author_link() ) ?>
-
+/**
+ * Enable Foundation responsive embeds for WP video embeds
+ */
-
+if ( ! function_exists( 'foundationpress_responsive_video_oembed_html' ) ) :
+function foundationpress_responsive_video_oembed_html( $html, $url, $attr, $post_id ) {
+
+ // Whitelist of oEmbed compatible sites that **ONLY** support video.
+ // Cannot determine if embed is a video or not from sites that
+ // support multiple embed types such as Facebook.
+ // Official list can be found here https://codex.wordpress.org/Embeds
+ $video_sites = array(
+ 'youtube', // first for performance
+ 'collegehumor',
+ 'dailymotion',
+ 'funnyordie',
+ 'ted',
+ 'videopress',
+ 'vimeo',
+ );
+
+ $is_video = false;
+
+ // Determine if embed is a video
+ foreach ( $video_sites as $site ) {
+ // Match on `$html` instead of `$url` because of
+ // shortened URLs like `youtu.be` will be missed
+ if ( strpos( $html, $site ) ) {
+ $is_video = true;
+ break;
+ }
+ }
-
+ // Process video embed
+ if ( true == $is_video ) {
-
- comment_approved ) : ?>
-
-
-
-
-
-
+ // Find the `
+ // Determine if aspect ratio is 16:9 or wider
+ if ( is_numeric( $width ) && is_numeric( $height ) && ( $width / $height >= 1.7 ) ) {
+ $class .= ' widescreen'; // space needed
+ }
- ' . $html . '
+ + +
+ + + +