From bbc1beb4d8cc2643d93565b560bc4ea98ef88298 Mon Sep 17 00:00:00 2001 From: Ole Fredrik Lie Date: Mon, 25 May 2015 14:37:36 +0200 Subject: [PATCH 01/18] Added better file doc comments --- 404.php | 11 ++++++- archive.php | 23 ++++++++++++-- comments.php | 40 ++++++++++++++++++------ content-none.php | 5 ++- content.php | 5 ++- footer.php | 12 ++++++++ functions.php | 60 +++++++++++++++++++++--------------- header.php | 53 ++++++++++++++++++++----------- library/enqueue-scripts.php | 26 +++++++++++----- library/entry-meta.php | 7 +++++ library/menu-walker.php | 5 +++ library/navigation.php | 8 +++-- library/offcanvas-walker.php | 5 +++ library/theme-support.php | 7 +++++ library/widget-areas.php | 8 +++++ 15 files changed, 209 insertions(+), 66 deletions(-) diff --git a/404.php b/404.php index 650221d76..05da63495 100644 --- a/404.php +++ b/404.php @@ -1,4 +1,13 @@ - +
diff --git a/archive.php b/archive.php index a1883ef72..ae29b1e61 100644 --- a/archive.php +++ b/archive.php @@ -1,4 +1,23 @@ - + +
@@ -13,7 +32,7 @@ - + diff --git a/comments.php b/comments.php index 6641c3463..513d5f5f3 100644 --- a/comments.php +++ b/comments.php @@ -1,4 +1,15 @@ @@ -35,9 +46,9 @@ ?> @@ -66,15 +77,21 @@

%s.', 'foundationpress' ), get_option( 'siteurl' ), $user_identity ); ?>

- + >

- + >

- +

@@ -82,14 +99,19 @@

-

XHTML:

+

XHTML: + + + + +

ID ); ?> - + diff --git a/content-none.php b/content-none.php index 65f5ce254..26c7c9e97 100644 --- a/content-none.php +++ b/content-none.php @@ -1,7 +1,10 @@ +
diff --git a/functions.php b/functions.php index b48c82272..a6fa13ec2 100644 --- a/functions.php +++ b/functions.php @@ -1,36 +1,48 @@ +?> \ No newline at end of file diff --git a/header.php b/header.php index c49d70bd0..9ed26c3a9 100644 --- a/header.php +++ b/header.php @@ -1,25 +1,40 @@ + > - <?php if ( is_category() ) { - echo 'Category Archive for "'; single_cat_title(); echo '" | '; bloginfo( 'name' ); - } elseif ( is_tag() ) { - echo 'Tag Archive for "'; single_tag_title(); echo '" | '; bloginfo( 'name' ); - } elseif ( is_archive() ) { - wp_title( '' ); echo ' Archive | '; bloginfo( 'name' ); - } elseif ( is_search() ) { - echo 'Search for "'.esc_html( $s ).'" | '; bloginfo( 'name' ); - } elseif ( is_home() || is_front_page() ) { - bloginfo( 'name' ); echo ' | '; bloginfo( 'description' ); - } elseif ( is_404() ) { - echo 'Error 404 Not Found | '; bloginfo( 'name' ); - } elseif ( is_single() ) { - wp_title( '' ); - } else { - echo wp_title( ' | ', 'false', 'right' ); bloginfo( 'name' ); - } ?> + + <?php + if ( is_category() ) { + echo 'Category Archive for "'; single_cat_title(); echo '" | '; bloginfo( 'name' ); + } elseif ( is_tag() ) { + echo 'Tag Archive for "'; single_tag_title(); echo '" | '; bloginfo( 'name' ); + } elseif ( is_archive() ) { + wp_title( '' ); echo ' Archive | '; bloginfo( 'name' ); + } elseif ( is_search() ) { + echo 'Search for "'.esc_html( $s ).'" | '; bloginfo( 'name' ); + } elseif ( is_home() || is_front_page() ) { + bloginfo( 'name' ); echo ' | '; bloginfo( 'description' ); + } elseif ( is_404() ) { + echo 'Error 404 Not Found | '; bloginfo( 'name' ); + } elseif ( is_single() ) { + wp_title( '' ); + } else { + echo wp_title( ' | ', 'false', 'right' ); bloginfo( 'name' ); + } + ?> + @@ -43,7 +58,9 @@
-

+

+ +

diff --git a/library/enqueue-scripts.php b/library/enqueue-scripts.php index 7b31175af..9a171cc03 100644 --- a/library/enqueue-scripts.php +++ b/library/enqueue-scripts.php @@ -1,31 +1,41 @@ +?> \ No newline at end of file diff --git a/library/entry-meta.php b/library/entry-meta.php index 24f8ecf45..f29a538a8 100644 --- a/library/entry-meta.php +++ b/library/entry-meta.php @@ -1,4 +1,11 @@ '. sprintf( __( 'Posted on %s at %s.', 'foundationpress' ), get_the_date(), get_the_time() ) .''; diff --git a/library/menu-walker.php b/library/menu-walker.php index 18bc46d41..4d07743be 100644 --- a/library/menu-walker.php +++ b/library/menu-walker.php @@ -1,7 +1,12 @@ 'Left Top Bar', // registers the menu in the WordPress admin menu editor 'top-bar-r' => 'Right Top Bar', diff --git a/library/offcanvas-walker.php b/library/offcanvas-walker.php index 30f6c8ded..4ace82027 100644 --- a/library/offcanvas-walker.php +++ b/library/offcanvas-walker.php @@ -1,7 +1,12 @@ Date: Mon, 25 May 2015 14:50:01 +0200 Subject: [PATCH 02/18] Added exclude rules to codesniffer ruleset --- codesniffer.ruleset.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codesniffer.ruleset.xml b/codesniffer.ruleset.xml index 1a0e37591..e524e843e 100644 --- a/codesniffer.ruleset.xml +++ b/codesniffer.ruleset.xml @@ -13,7 +13,9 @@ + + \ No newline at end of file From 7fa04bc4659a0e7be70ff1975998d4cb7546a2f2 Mon Sep 17 00:00:00 2001 From: Ole Fredrik Lie Date: Mon, 25 May 2015 14:53:11 +0200 Subject: [PATCH 03/18] Removed exclude rule from codesniffer ruleset --- codesniffer.ruleset.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/codesniffer.ruleset.xml b/codesniffer.ruleset.xml index e524e843e..56133692e 100644 --- a/codesniffer.ruleset.xml +++ b/codesniffer.ruleset.xml @@ -13,7 +13,6 @@ - From 472f25408f5e8ea8e776c86feea642a108ae227a Mon Sep 17 00:00:00 2001 From: Ole Fredrik Lie Date: Mon, 25 May 2015 15:02:56 +0200 Subject: [PATCH 04/18] Fix codesniffer errors in files --- 404.php | 2 +- archive.php | 2 +- comments.php | 30 +++++++++++++++++++++--------- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/404.php b/404.php index 05da63495..12870baa6 100644 --- a/404.php +++ b/404.php @@ -1,4 +1,4 @@ -

>

>

- +

XHTML: - + @@ -113,5 +125,5 @@ + endif; // If you delete this the sky will fall on your head. +?> \ No newline at end of file From 43033bb45f750bba80d19025cb21c3f0ce8714e2 Mon Sep 17 00:00:00 2001 From: Ole Fredrik Lie Date: Mon, 25 May 2015 15:09:05 +0200 Subject: [PATCH 05/18] Exclude non-sense rules --- codesniffer.ruleset.xml | 6 +++++- comments.php | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/codesniffer.ruleset.xml b/codesniffer.ruleset.xml index 56133692e..974850e94 100644 --- a/codesniffer.ruleset.xml +++ b/codesniffer.ruleset.xml @@ -9,8 +9,12 @@ - + + + + + diff --git a/comments.php b/comments.php index afbeb43c9..990633e4e 100644 --- a/comments.php +++ b/comments.php @@ -46,9 +46,12 @@ ?> @@ -78,7 +81,7 @@

From a73f9bcd71ce4100c606263eabb3b1508836bfc2 Mon Sep 17 00:00:00 2001 From: Ole Fredrik Lie Date: Mon, 25 May 2015 15:12:16 +0200 Subject: [PATCH 06/18] Remove white-spaces at end of line in comments --- comments.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/comments.php b/comments.php index 990633e4e..e6723462e 100644 --- a/comments.php +++ b/comments.php @@ -49,9 +49,9 @@ /* Do not delete these lines. - Prevent access to this file directly + Prevent access to this file directly */ - + defined( 'ABSPATH' ) or die( __( 'Please do not load this page directly. Thanks!', 'foundationpress' ) ); if ( post_password_required() ) { ?> @@ -82,23 +82,23 @@

>

>

@@ -106,15 +106,15 @@

XHTML: - From 1c74b9e02cdcc641d3a11cecd6f7a01a8bcb86d7 Mon Sep 17 00:00:00 2001 From: Ole Fredrik Lie Date: Mon, 25 May 2015 15:15:17 +0200 Subject: [PATCH 07/18] remove empty if statement in content --- content.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content.php b/content.php index 495591060..274744f03 100755 --- a/content.php +++ b/content.php @@ -19,7 +19,7 @@

-

+


From ce2b52910b8d113ca8eb520078b6c2f9ddad7ed2 Mon Sep 17 00:00:00 2001 From: Ole Fredrik Lie Date: Mon, 25 May 2015 15:31:05 +0200 Subject: [PATCH 08/18] Updated travis and codesniffer files --- .travis.yml | 147 ++++++++++++++++++++-------------------- codesniffer.ruleset.xml | 15 +--- content.php | 2 +- footer.php | 2 +- 4 files changed, 79 insertions(+), 87 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1f7529664..89be854f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ -# Travis CI (MIT License) configuration file for the FoundationPress WordPress theme +# Travis CI (MIT License) configuration file for the Underscores WordPress theme. # @link https://travis-ci.org/ -# For use with the FoundationPress WordPress theme -# @link https://github.com/olefredrik/FoundationPress +# For use with the FoundationPress WordPress theme. +# @link https://github.com/olefredrik/foundationpress # Declare project language. # @link http://about.travis-ci.org/docs/user/languages/php/ @@ -10,38 +10,41 @@ language: php # Declare versions of PHP to use. Use one decimal max. php: - # aliased to a recent 5.5.x version - - "5.5" - # aliased to a recent 5.4.x version - - "5.4" - # aliased to a recent 5.3.x version - - "5.3" - # Current $required_php_version for WordPress: 5.2.4 - - "5.2" + # aliased to a recent 5.5.x version + - "5.5" + # aliased to a recent 5.4.x version + - "5.4" + # aliased to a recent 5.3.x version + - "5.3" + # Current $required_php_version for WordPress: 5.2.4 + - "5.2" # Declare which versions of WordPress to test against. # Also declare whether or not to test in Multisite. env: - # Trunk - # @link https://github.com/WordPress/WordPress - - WP_VERSION=master WP_MULTISITE=0 - # WordPress 4.1 - # @link https://github.com/WordPress/WordPress/tree/4.1-branch - - WP_VERSION=4.1 WP_MULTISITE=0 - # WordPress 4.0 - # @link https://github.com/WordPress/WordPress/tree/4.0-branch - - WP_VERSION=4.0 WP_MULTISITE=0 + # Trunk + # @link https://github.com/WordPress/WordPress + - WP_VERSION=master WP_MULTISITE=0 + - WP_VERSION=master WP_MULTISITE=1 + # WordPress 4.2 + # @link https://github.com/WordPress/WordPress/tree/4.2-branch + - WP_VERSION=4.2 WP_MULTISITE=0 + - WP_VERSION=4.2 WP_MULTISITE=1 + # WordPress 4.1 + # @link https://github.com/WordPress/WordPress/tree/4.1-branch + - WP_VERSION=4.1 WP_MULTISITE=0 + - WP_VERSION=4.1 WP_MULTISITE=1 # Declare 5.6 beta in test matrix. # @link https://buddypress.trac.wordpress.org/ticket/5620 # @link http://docs.travis-ci.com/user/build-configuration/ matrix: - include: - - php: 5.6 - env: WP_VERSION=master - allow_failures: - - php: 5.6 - fast_finish: true + include: + - php: 5.6 + env: WP_VERSION=master + allow_failures: + - php: 5.6 + fast_finish: true # Use this to prepare the system to install prerequisites or dependencies. # e.g. sudo apt-get update. @@ -52,59 +55,57 @@ matrix: # e.g. copy database configurations, environment variables, etc. # Failures in this section will result in build status 'errored'. before_script: - # Set up WordPress installation. - - export WP_DEVELOP_DIR=/tmp/wordpress/ - - mkdir -p $WP_DEVELOP_DIR - # Use the Git mirror of WordPress. - - git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR - # Set up theme information. - - theme_slug=$(basename $(pwd)) - - theme_dir=$WP_DEVELOP_DIR/src/wp-content/themes/$theme_slug - - cd .. - - mv $theme_slug $theme_dir - # Set up WordPress configuration. - - cd $WP_DEVELOP_DIR - - echo $WP_DEVELOP_DIR - - cp wp-tests-config-sample.php wp-tests-config.php - - sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php - - sed -i "s/yourusernamehere/root/" wp-tests-config.php - - sed -i "s/yourpasswordhere//" wp-tests-config.php - # Create WordPress database. - - mysql -e 'CREATE DATABASE wordpress_test;' -uroot - # Install CodeSniffer for WordPress Coding Standards checks. - - git clone https://github.com/squizlabs/PHP_CodeSniffer.git php-codesniffer - # Install WordPress Coding Standards. - - git clone https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wordpress-coding-standards - # Hop into CodeSniffer directory. - - cd php-codesniffer - # Set install path for WordPress Coding Standards - # @link https://github.com/squizlabs/PHP_CodeSniffer/blob/4237c2fc98cc838730b76ee9cee316f99286a2a7/CodeSniffer.php#L1941 - - scripts/phpcs --config-set installed_paths ../wordpress-coding-standards - # Hop into themes directory. - - cd $theme_dir - # After CodeSniffer install you should refresh your path. - - phpenv rehash + # Set up WordPress installation. + - export WP_DEVELOP_DIR=/tmp/wordpress/ + - mkdir -p $WP_DEVELOP_DIR + # Use the Git mirror of WordPress. + - git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR + # Set up theme information. + - theme_slug=$(basename $(pwd)) + - theme_dir=$WP_DEVELOP_DIR/src/wp-content/themes/$theme_slug + - cd .. + - mv $theme_slug $theme_dir + # Set up WordPress configuration. + - cd $WP_DEVELOP_DIR + - echo $WP_DEVELOP_DIR + - cp wp-tests-config-sample.php wp-tests-config.php + - sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php + - sed -i "s/yourusernamehere/root/" wp-tests-config.php + - sed -i "s/yourpasswordhere//" wp-tests-config.php + # Create WordPress database. + - mysql -e 'CREATE DATABASE wordpress_test;' -uroot + # Install CodeSniffer for WordPress Coding Standards checks. + - git clone https://github.com/squizlabs/PHP_CodeSniffer.git php-codesniffer + # Install WordPress Coding Standards. + - git clone https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wordpress-coding-standards + # Hop into CodeSniffer directory. + - cd php-codesniffer + # Set install path for WordPress Coding Standards. + # @link https://github.com/squizlabs/PHP_CodeSniffer/blob/4237c2fc98cc838730b76ee9cee316f99286a2a7/CodeSniffer.php#L1941 + - scripts/phpcs --config-set installed_paths ../wordpress-coding-standards + # Hop into themes directory. + - cd $theme_dir + # After CodeSniffer install you should refresh your path. + - phpenv rehash # Run test script commands. # Default is specific to project language. # All commands must exit with code 0 on success. Anything else is considered failure. script: - # Search for PHP syntax errors. - - find . \( -name '*.php' \) -exec php -lf {} \; - # WordPress Coding Standards - # @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards - # @link http://pear.php.net/package/PHP_CodeSniffer/ - # -p flag: Show progress of the run. - # -s flag: Show sniff codes in all reports. - # -v flag: Print verbose output. - # -n flag: Do not print warnings (shortcut for --warning-severity=0) - # --standard: Use WordPress as the standard. - # --extensions: Only sniff PHP files. - # --ignore: Ignore these files/directories - - $WP_DEVELOP_DIR/php-codesniffer/scripts/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php --ignore=./bower_components/ - + # Search for PHP syntax errors. + - find . \( -name '*.php' \) -exec php -lf {} \; + # WordPress Coding Standards + # @link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards + # @link http://pear.php.net/package/PHP_CodeSniffer/ + # -p flag: Show progress of the run. + # -s flag: Show sniff codes in all reports. + # -v flag: Print verbose output. + # -n flag: Do not print warnings. (shortcut for --warning-severity=0) + # --standard: Use WordPress as the standard. + # --extensions: Only sniff PHP files. + - $WP_DEVELOP_DIR/php-codesniffer/scripts/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php # Receive notifications for build results. # @link http://docs.travis-ci.com/user/notifications/#Email-notifications notifications: - email: false + email: false \ No newline at end of file diff --git a/codesniffer.ruleset.xml b/codesniffer.ruleset.xml index 974850e94..b313a022e 100644 --- a/codesniffer.ruleset.xml +++ b/codesniffer.ruleset.xml @@ -1,24 +1,15 @@ - + - A series of tests used to check FoundationPress for compliance with WordPress Coding Standards + A custom set of code standard rules to check for WordPress themes. - - - - + - - - - - - \ No newline at end of file diff --git a/content.php b/content.php index 274744f03..cb83302ea 100755 --- a/content.php +++ b/content.php @@ -22,4 +22,4 @@


- + \ No newline at end of file diff --git a/footer.php b/footer.php index de29c0b76..d53ad925b 100644 --- a/footer.php +++ b/footer.php @@ -24,4 +24,4 @@ - + \ No newline at end of file From 7c2d673a00cf63347ae3d1a129d7b9b529c60bd1 Mon Sep 17 00:00:00 2001 From: Ole Fredrik Lie Date: Mon, 25 May 2015 15:43:55 +0200 Subject: [PATCH 09/18] Added a few exclude statements in ruleset --- codesniffer.ruleset.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/codesniffer.ruleset.xml b/codesniffer.ruleset.xml index b313a022e..6343753bf 100644 --- a/codesniffer.ruleset.xml +++ b/codesniffer.ruleset.xml @@ -10,6 +10,13 @@ + + + + + + +
\ No newline at end of file From 40019da9ad3d6b10726cd9eac892499d559d30c6 Mon Sep 17 00:00:00 2001 From: Ole Fredrik Lie Date: Mon, 25 May 2015 16:35:05 +0200 Subject: [PATCH 10/18] Fixed a few build errors --- content-none.php | 1 + content.php | 1 + footer.php | 1 + header.php | 5 +++-- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/content-none.php b/content-none.php index 26c7c9e97..1b50e051d 100644 --- a/content-none.php +++ b/content-none.php @@ -8,6 +8,7 @@ * @subpackage FoundationPress * @since FoundationPress 1.0 */ + ?>
diff --git a/library/custom-header.php b/library/custom-header.php index 61ddb340a..54f2eb506 100644 --- a/library/custom-header.php +++ b/library/custom-header.php @@ -1,6 +1,6 @@ '', From 24c5fcb9e29d3fce3809e09016068f547d1ce0fa Mon Sep 17 00:00:00 2001 From: Ole Fredrik Lie Date: Mon, 25 May 2015 17:22:42 +0200 Subject: [PATCH 15/18] Codesniffer cleanup --- .travis.yml | 2 +- codesniffer.ruleset.xml | 6 ++++++ comments.php | 4 ++-- library/cleanup.php | 2 +- library/enqueue-scripts.php | 2 +- library/navigation.php | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 89be854f5..f9308d57f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# Travis CI (MIT License) configuration file for the Underscores WordPress theme. +# Travis CI (MIT License) configuration file for the FoundationPress WordPress theme. # @link https://travis-ci.org/ # For use with the FoundationPress WordPress theme. diff --git a/codesniffer.ruleset.xml b/codesniffer.ruleset.xml index 0a86980e0..b06464176 100644 --- a/codesniffer.ruleset.xml +++ b/codesniffer.ruleset.xml @@ -12,17 +12,23 @@ + + + + + + \ No newline at end of file diff --git a/comments.php b/comments.php index e6723462e..1f37e40be 100644 --- a/comments.php +++ b/comments.php @@ -6,8 +6,8 @@ * and the comment form. * * @package WordPress - * @subpackage Twenty_Fifteen - * @since Twenty Fifteen 1.0 + * @subpackage FoundationPress + * @since FoundationPress 1.0 */ if ( have_comments() ) : diff --git a/library/cleanup.php b/library/cleanup.php index 711584697..3c5e5246a 100644 --- a/library/cleanup.php +++ b/library/cleanup.php @@ -98,6 +98,7 @@ function foundationpress_remove_rss_version() { return ''; } endif; if ( ! function_exists( 'foundationpress_remove_wp_ver_css_js' ) ) : + // Remove WP version from scripts. function foundationpress_remove_wp_ver_css_js( $src ) { if ( strpos( $src, 'ver=' ) ) { @@ -138,7 +139,6 @@ function foundationpress_gallery_style($css) { */ // Remove default inline style of wp-caption. - if ( ! function_exists( 'foundationpress_fixed_img_caption_shortcode' ) ) : add_shortcode( 'wp_caption', 'foundationpress_fixed_img_caption_shortcode' ); add_shortcode( 'caption', 'foundationpress_fixed_img_caption_shortcode' ); diff --git a/library/enqueue-scripts.php b/library/enqueue-scripts.php index 9a171cc03..5b427339f 100644 --- a/library/enqueue-scripts.php +++ b/library/enqueue-scripts.php @@ -4,7 +4,7 @@ * * Learn more about enqueue_script: {@link https://codex.wordpress.org/Function_Reference/wp_enqueue_script} * Learn more about enqueue_style: {@link https://codex.wordpress.org/Function_Reference/wp_enqueue_style } - * + * * @package WordPress * @subpackage FoundationPress * @since FoundationPress 1.0 diff --git a/library/navigation.php b/library/navigation.php index 75013a0ed..c0765c056 100644 --- a/library/navigation.php +++ b/library/navigation.php @@ -9,7 +9,7 @@ */ register_nav_menus(array( - 'top-bar-l' => 'Left Top Bar', // registers the menu in the WordPress admin menu editor + 'top-bar-l' => 'Left Top Bar', // Registers the menu in the WordPress admin menu editor. 'top-bar-r' => 'Right Top Bar', 'mobile-off-canvas' => 'Mobile', )); From cf49110dc0dbb4ceae0396208622e401e71250c3 Mon Sep 17 00:00:00 2001 From: Ole Fredrik Lie Date: Mon, 25 May 2015 17:36:38 +0200 Subject: [PATCH 16/18] Fixed empty spaces and stuff --- codesniffer.ruleset.xml | 2 +- library/enqueue-scripts.php | 3 --- library/foundation.php | 20 ++++++++++++++------ library/navigation.php | 6 +++--- library/theme-support.php | 4 ++-- page.php | 2 +- parts/off-canvas-menu.php | 4 ++-- parts/top-bar.php | 6 +++--- search.php | 2 +- searchform.php | 2 +- sidebar-left.php | 2 +- sidebar.php | 2 +- 12 files changed, 30 insertions(+), 25 deletions(-) diff --git a/codesniffer.ruleset.xml b/codesniffer.ruleset.xml index b06464176..b1c9050e9 100644 --- a/codesniffer.ruleset.xml +++ b/codesniffer.ruleset.xml @@ -24,11 +24,11 @@ + - \ No newline at end of file diff --git a/library/enqueue-scripts.php b/library/enqueue-scripts.php index 5b427339f..d0685667c 100644 --- a/library/enqueue-scripts.php +++ b/library/enqueue-scripts.php @@ -28,9 +28,6 @@ function foundationpress_scripts() { // CDN hosted jQuery placed in the header, as some plugins require that jQuery is loaded in the header. wp_enqueue_script( 'jquery', '//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js', array(), '2.1.0', false ); - // Self hosted jQuery placed in the footer. (Comment the script above and uncomment the script below if you want to switch). - // wp_register_script( 'jquery', get_template_directory_uri() . '/js/vendor/jquery.js', array(), '2.1.3', true ); - // If you'd like to cherry-pick the foundation components you need in your project, head over to Gruntfile.js and see lines 67-88. // It's a good idea to do this, performance-wise. No need to load everything if you're just going to use the grid anyway, you know :) wp_register_script( 'foundation', get_template_directory_uri() . '/js/foundation.js', array('jquery'), '5.5.2', true ); diff --git a/library/foundation.php b/library/foundation.php index 8f2c3d2e5..890b72734 100644 --- a/library/foundation.php +++ b/library/foundation.php @@ -1,5 +1,13 @@ ", "
  • ", $paginate_links ); $paginate_links = preg_replace( '/\s*page-numbers/', '', $paginate_links ); - // Display the pagination if more than one page is found + // Display the pagination if more than one page is found. if ( $paginate_links ) { echo '
    '; echo $paginate_links; @@ -42,7 +50,7 @@ function foundationpress_pagination() { if ( ! function_exists( 'foundationpress_menu_fallback' ) ) : function foundationpress_menu_fallback() { echo '
    '; - // Translators 1: Link to Menus, 2: Link to Customize + // 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' ) @@ -55,7 +63,7 @@ function foundationpress_menu_fallback() { } endif; -// Add Foundation 'active' class for the current menu item +// Add Foundation '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 ) { @@ -68,7 +76,7 @@ function foundationpress_active_nav_class( $classes, $item ) { /** * Use the active class of ZURB Foundation on wp_list_pages output. - * From required+ Foundation http://themes.required.ch + * From required+ Foundation http://themes.required.ch. */ if ( ! function_exists( 'foundationpress_active_list_pages_class' ) ) : function foundationpress_active_list_pages_class( $input ) { @@ -86,7 +94,7 @@ function foundationpress_active_list_pages_class( $input ) { if ( ! class_exists( 'Foundationpress_Comments' ) ) : class Foundationpress_Comments extends Walker_Comment{ - // init classwide variables + // Init classwide variables. var $tree_type = 'comment'; var $db_fields = array( 'parent' => 'comment_parent', 'id' => 'comment_ID' ); diff --git a/library/navigation.php b/library/navigation.php index c0765c056..b6770853d 100644 --- a/library/navigation.php +++ b/library/navigation.php @@ -33,7 +33,7 @@ function foundationpress_top_bar_l() { 'link_after' => '', // after each link text 'depth' => 5, // limit the depth of the nav 'fallback_cb' => false, // fallback function (see below) - 'walker' => new Foundationpress_Top_Bar_Walker() + 'walker' => new Foundationpress_Top_Bar_Walker(), )); } } @@ -55,7 +55,7 @@ function foundationpress_top_bar_r() { 'link_after' => '', // after each link text 'depth' => 5, // limit the depth of the nav 'fallback_cb' => false, // fallback function (see below) - 'walker' => new Foundationpress_Top_Bar_Walker() + 'walker' => new Foundationpress_Top_Bar_Walker(), )); } } @@ -77,7 +77,7 @@ function foundationpress_mobile_off_canvas() { 'link_after' => '', // after each link text 'depth' => 5, // limit the depth of the nav 'fallback_cb' => false, // fallback function (see below) - 'walker' => new Foundationpress_Offcanvas_Walker() + 'walker' => new Foundationpress_Offcanvas_Walker(), )); } } diff --git a/library/theme-support.php b/library/theme-support.php index 6ea8bfb72..0bb29761a 100644 --- a/library/theme-support.php +++ b/library/theme-support.php @@ -17,9 +17,9 @@ function foundationpress_theme_support() { // Add post thumbnail support: http://codex.wordpress.org/Post_Thumbnails add_theme_support( 'post-thumbnails' ); - // set_post_thumbnail_size(150, 150, false); + // Set_post_thumbnail_size(150, 150, false); - // rss thingy + // RSS thingy add_theme_support( 'automatic-feed-links' ); // Add post formarts support: http://codex.wordpress.org/Post_Formats diff --git a/page.php b/page.php index 8ab1b7f99..06e80ca66 100644 --- a/page.php +++ b/page.php @@ -1,4 +1,4 @@ - +?> \ No newline at end of file diff --git a/parts/top-bar.php b/parts/top-bar.php index 5b10099db..7ef732ec0 100644 --- a/parts/top-bar.php +++ b/parts/top-bar.php @@ -1,4 +1,4 @@ - +?>
    -
    +
    \ No newline at end of file diff --git a/search.php b/search.php index f7c7bc116..504484990 100644 --- a/search.php +++ b/search.php @@ -1,4 +1,4 @@ - +?>