diff --git a/.travis.yml b/.travis.yml index 7c6946a..65189d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,9 @@ matrix: - php: '5.6' - php: '7.0' - php: '7.1' - env: SNIFF=1 - env: DEPLOY=1 + env: + - DEPLOY=1 + - SNIFF=1 before_script: - export PHPCS_DIR=/tmp/phpcs - export SNIFFS_DIR=/tmp/sniffs @@ -19,7 +20,7 @@ before_script: $PHPCS_DIR; fi - if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git $SNIFFS_DIR; fi -- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git +- if [[ "$SNIFF" == "1" ]]; then git clone -b 7.1.4 --depth 1 https://github.com/wimg/PHPCompatibility.git $SNIFFS_DIR/PHPCompatibility; fi - if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs --config-set installed_paths $SNIFFS_DIR; fi @@ -50,10 +51,10 @@ script: --standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/*.php; fi - if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/*.php - --standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/*.php; + --standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/*.php,./inc/libraries/epsilon-framework/*.php; fi - if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/**/*.php - --standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/**/*.php; + --standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/**/*.php,./inc/libraries/epsilon-framework/**/*.php; fi notifications: email: false diff --git a/404.php b/404.php index 590a3de..e483382 100644 --- a/404.php +++ b/404.php @@ -10,8 +10,8 @@ @@ -21,12 +21,12 @@
- +
-

-
- +

+
+
diff --git a/comments.php b/comments.php index a1892e3..a2d3f2f 100755 --- a/comments.php +++ b/comments.php @@ -54,10 +54,12 @@ @@ -84,8 +86,8 @@ '
', - 'email' => '
', - 'url' => '
', + 'email' => '
', + 'url' => '
', ); if ( is_user_logged_in() ) { @@ -118,13 +120,15 @@ } ?> $fields, - 'comment_field' => $comment_textarea, - 'id_submit' => 'input-submit', - 'label_submit' => esc_attr__( 'Send', 'illdy' ), - 'title_reply' => esc_attr__( 'Leave a comment', 'illdy' ), - 'title_reply_to' => esc_attr__( 'Leave a comment to %s', 'illdy' ), - ) ); + comment_form( + array( + 'fields' => $fields, + 'comment_field' => $comment_textarea, + 'id_submit' => 'input-submit', + 'label_submit' => esc_attr__( 'Send', 'illdy' ), + 'title_reply' => esc_attr__( 'Leave a comment', 'illdy' ), + 'title_reply_to' => esc_attr__( 'Leave a comment to %s', 'illdy' ), + ) + ); ?>
diff --git a/footer.php b/footer.php index 66780bc..8bcde0c 100755 --- a/footer.php +++ b/footer.php @@ -9,9 +9,9 @@ + + + + + diff --git a/front-page.php b/front-page.php index 80818dd..d162995 100755 --- a/front-page.php +++ b/front-page.php @@ -11,7 +11,7 @@ if ( get_option( 'show_on_front' ) == 'posts' ) : ?> - +
@@ -37,19 +37,21 @@ + if ( '' != $static_page_content ) : + ?>
diff --git a/functions.php b/functions.php index 4a61aed..217044f 100755 --- a/functions.php +++ b/functions.php @@ -36,29 +36,35 @@ function illdy_setup() { add_theme_support( 'automatic-feed-links' ); add_theme_support( 'title-tag' ); add_theme_support( 'post-thumbnails' ); - add_theme_support( 'custom-logo', array( - 'height' => 75, - 'flex-height' => false, - 'flex-width' => true, - ) ); + add_theme_support( + 'custom-logo', array( + 'height' => 75, + 'flex-height' => false, + 'flex-width' => true, + ) + ); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); - add_theme_support( 'custom-header', array( - 'default-image' => esc_url( get_template_directory_uri() . '/layout/images/blog/blog-header.png' ), - 'width' => 1920, - 'height' => 532, - 'flex-height' => true, - 'flex-width' => true, - 'random-default' => true, - 'header-text' => false, - ) ); + add_theme_support( + 'custom-header', array( + 'default-image' => esc_url( get_template_directory_uri() . '/layout/images/blog/blog-header.png' ), + 'width' => 1920, + 'height' => 532, + 'flex-height' => true, + 'flex-width' => true, + 'random-default' => true, + 'header-text' => false, + ) + ); add_theme_support( 'customize-selective-refresh-widgets' ); - register_default_headers( array( - 'default' => array( - 'url' => '%s/layout/images/blog/blog-header.png', - 'thumbnail_url' => '%s/layout/images/blog/blog-header.png', - 'description' => __( 'Coffe', 'illdy' ), - ), - ) ); + register_default_headers( + array( + 'default' => array( + 'url' => '%s/layout/images/blog/blog-header.png', + 'thumbnail_url' => '%s/layout/images/blog/blog-header.png', + 'description' => __( 'Coffe', 'illdy' ), + ), + ) + ); // Add Image Size add_image_size( 'illdy-blog-list', 750, 500, true ); @@ -70,9 +76,11 @@ function illdy_setup() { add_image_size( 'illdy-front-page-person', 125, 125, true ); // Register Nav Menus - register_nav_menus( array( - 'primary-menu' => __( 'Primary Menu', 'illdy' ), - ) ); + register_nav_menus( + array( + 'primary-menu' => __( 'Primary Menu', 'illdy' ), + ) + ); /** * Back compatible @@ -157,8 +165,15 @@ function illdy_enqueue_stylesheets() { if ( get_theme_mod( 'illdy_projects_lightbox', 0 ) == 1 ) { wp_enqueue_style( 'illdy-fancybox', get_template_directory_uri() . '/layout/css/jquery.fancybox.css', array(), '', 'all' ); } - wp_enqueue_style( 'illdy-main', get_template_directory_uri() . '/layout/css/main.min.css', array(), '', 'all' ); - wp_enqueue_style( 'illdy-custom', get_template_directory_uri() . '/layout/css/custom.min.css', array(), '', 'all' ); + wp_enqueue_style( 'illdy-main', get_template_directory_uri() . '/layout/css/main.css', array(), '', 'all' ); + if ( get_theme_mod( 'illdy_sticky_header_enable', false ) ) { + $background_color = get_theme_mod( 'illdy_sticky_header_background_color', '#000000' ); + if ( '#000000' != $background_color ) { + $custom_css = '#header .is-sticky .top-header {background-color: ' . esc_attr( $background_color ) . ';}'; + wp_add_inline_style( 'illdy-main', $custom_css ); + } + } + wp_enqueue_style( 'illdy-custom', get_template_directory_uri() . '/layout/css/custom.css', array(), '', 'all' ); wp_enqueue_style( 'illdy-style', get_stylesheet_uri(), array(), '1.0.16', 'all' ); } } @@ -175,7 +190,7 @@ function illdy_enqueue_javascripts() { wp_enqueue_script( 'illdy-pace', get_template_directory_uri() . '/layout/js/pace/pace.min.js', array( 'jquery' ), '', false ); $pace_options = array( 'restartOnRequestAfter' => 0, - 'restartOnPushState' => 0, + 'restartOnPushState' => 0, ); wp_localize_script( 'illdy-pace', 'paceOptions', $pace_options ); } @@ -185,12 +200,16 @@ function illdy_enqueue_javascripts() { wp_enqueue_script( 'illdy-count-to', get_template_directory_uri() . '/layout/js/count-to/count-to.min.js', array( 'jquery' ), '', true ); wp_enqueue_script( 'illdy-visible', get_template_directory_uri() . '/layout/js/visible/visible.min.js', array( 'jquery' ), '', true ); if ( get_theme_mod( 'illdy_projects_lightbox', 0 ) == 1 ) { - wp_enqueue_script( 'illdy-fancybox', get_template_directory_uri() . '/layout/js/jquery.fancybox.js', array( 'jquery' ), '', true ); + wp_enqueue_script( 'illdy-fancybox', get_template_directory_uri() . '/layout/js/fancybox/jquery.fancybox.js', array( 'jquery' ), '', true ); wp_add_inline_script( 'illdy-fancybox', 'jQuery(".fancybox").fancybox();' ); } + if ( get_theme_mod( 'illdy_sticky_header_enable', false ) ) { + wp_enqueue_script( 'illdy-stickyheader', get_template_directory_uri() . '/layout/js/stickyjs/jquery.sticky.js', array( 'jquery' ), '', true ); + wp_add_inline_script( 'illdy-stickyheader', 'jQuery(".top-header").sticky({topSpacing:0,zIndex:99});' ); + } wp_enqueue_script( 'illdy-parallax', get_template_directory_uri() . '/layout/js/parallax/parallax.min.js', array( 'jquery' ), '1.0.16', true ); wp_enqueue_script( 'illdy-plugins', get_template_directory_uri() . '/layout/js/plugins.min.js', array( 'jquery' ), '1.0.16', true ); - wp_enqueue_script( 'illdy-scripts', get_template_directory_uri() . '/layout/js/scripts.min.js', array( 'jquery' ), '1.0.16', true ); + wp_enqueue_script( 'illdy-scripts', get_template_directory_uri() . '/layout/js/scripts.js', array( 'jquery' ), '1.0.16', true ); if ( is_front_page() ) { wp_add_inline_script( 'illdy-scripts', 'if( jQuery(\'.blog-carousel > .illdy-blog-post\').length > 3 ){jQuery(\'.blog-carousel\').owlCarousel({\'items\': 3,\'loop\': true,\'dots\': false,\'nav\' : true, \'navText\':[\'\',\'\'], responsive : { 0 : { items : 1 }, 480 : { items : 2 }, 900 : { items : 3 } }});}' ); $jumbotron_type = get_theme_mod( 'illdy_jumbotron_background_type', 'image' ); @@ -216,159 +235,187 @@ function illdy_enqueue_javascripts() { function illdy_widgets() { // Blog Sidebar - register_sidebar( array( - 'name' => __( 'Blog Sidebar', 'illdy' ), - 'id' => 'blog-sidebar', - 'description' => __( 'The widgets added in this sidebar will appear in blog page.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '
', - 'after_title' => '
', - ) ); + register_sidebar( + array( + 'name' => __( 'Blog Sidebar', 'illdy' ), + 'id' => 'blog-sidebar', + 'description' => __( 'The widgets added in this sidebar will appear in blog page.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '
', + 'after_title' => '
', + ) + ); // Page Sidebar - register_sidebar( array( - 'name' => __( 'Page Sidebar', 'illdy' ), - 'id' => 'page-sidebar', - 'description' => __( 'The widgets added in this sidebar will appear on single pages.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '
', - 'after_title' => '
', - ) ); + register_sidebar( + array( + 'name' => __( 'Page Sidebar', 'illdy' ), + 'id' => 'page-sidebar', + 'description' => __( 'The widgets added in this sidebar will appear on single pages.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '
', + 'after_title' => '
', + ) + ); // Footer Sidebar 1 - register_sidebar( array( - 'name' => __( 'Footer Sidebar 1', 'illdy' ), - 'id' => 'footer-sidebar-1', - 'description' => __( 'The widgets added in this sidebar will appear in first block from footer.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '
', - 'after_title' => '
', - ) ); + register_sidebar( + array( + 'name' => __( 'Footer Sidebar 1', 'illdy' ), + 'id' => 'footer-sidebar-1', + 'description' => __( 'The widgets added in this sidebar will appear in first block from footer.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '
', + 'after_title' => '
', + ) + ); // Footer Sidebar 2 - register_sidebar( array( - 'name' => __( 'Footer Sidebar 2', 'illdy' ), - 'id' => 'footer-sidebar-2', - 'description' => __( 'The widgets added in this sidebar will appear in second block from footer.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '
', - 'after_title' => '
', - ) ); + register_sidebar( + array( + 'name' => __( 'Footer Sidebar 2', 'illdy' ), + 'id' => 'footer-sidebar-2', + 'description' => __( 'The widgets added in this sidebar will appear in second block from footer.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '
', + 'after_title' => '
', + ) + ); // Footer Sidebar 3 - register_sidebar( array( - 'name' => __( 'Footer Sidebar 3', 'illdy' ), - 'id' => 'footer-sidebar-3', - 'description' => __( 'The widgets added in this sidebar will appear in third block from footer.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '
', - 'after_title' => '
', - ) ); + register_sidebar( + array( + 'name' => __( 'Footer Sidebar 3', 'illdy' ), + 'id' => 'footer-sidebar-3', + 'description' => __( 'The widgets added in this sidebar will appear in third block from footer.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '
', + 'after_title' => '
', + ) + ); // Footer Sidebar 4 - register_sidebar( array( - 'name' => __( 'Footer Sidebar 4', 'illdy' ), - 'id' => 'footer-sidebar-4', - 'description' => __( 'The widgets added in this sidebar will appear in fourth block from footer.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '
', - 'after_title' => '
', - ) ); + register_sidebar( + array( + 'name' => __( 'Footer Sidebar 4', 'illdy' ), + 'id' => 'footer-sidebar-4', + 'description' => __( 'The widgets added in this sidebar will appear in fourth block from footer.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '
', + 'after_title' => '
', + ) + ); // About Sidebar - register_sidebar( array( - 'name' => __( 'Front page - About Sidebar', 'illdy' ), - 'id' => 'front-page-about-sidebar', - 'description' => __( 'The widgets added in this sidebar will appear in about section from front page.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '', - 'after_title' => '', - ) ); + register_sidebar( + array( + 'name' => __( 'Front page - About Sidebar', 'illdy' ), + 'id' => 'front-page-about-sidebar', + 'description' => __( 'The widgets added in this sidebar will appear in about section from front page.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '', + 'after_title' => '', + ) + ); // Projects Sidebar - register_sidebar( array( - 'name' => __( 'Front page - Projects Sidebar', 'illdy' ), - 'id' => 'front-page-projects-sidebar', - 'description' => __( 'The widgets added in this sidebar will appear in projects section from front page.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '', - 'after_title' => '', - ) ); + register_sidebar( + array( + 'name' => __( 'Front page - Projects Sidebar', 'illdy' ), + 'id' => 'front-page-projects-sidebar', + 'description' => __( 'The widgets added in this sidebar will appear in projects section from front page.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '', + 'after_title' => '', + ) + ); // Services Sidebar - register_sidebar( array( - 'name' => __( 'Front page - Services Sidebar', 'illdy' ), - 'id' => 'front-page-services-sidebar', - 'description' => __( 'The widgets added in this sidebar will appear in services section from front page.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '', - 'after_title' => '', - ) ); + register_sidebar( + array( + 'name' => __( 'Front page - Services Sidebar', 'illdy' ), + 'id' => 'front-page-services-sidebar', + 'description' => __( 'The widgets added in this sidebar will appear in services section from front page.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '', + 'after_title' => '', + ) + ); // Counter Sidebar - register_sidebar( array( - 'name' => __( 'Front page - Counter Sidebar', 'illdy' ), - 'id' => 'front-page-counter-sidebar', - 'description' => __( 'The widgets added in this sidebar will appear in counter section from front page.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '', - 'after_title' => '', - ) ); + register_sidebar( + array( + 'name' => __( 'Front page - Counter Sidebar', 'illdy' ), + 'id' => 'front-page-counter-sidebar', + 'description' => __( 'The widgets added in this sidebar will appear in counter section from front page.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '', + 'after_title' => '', + ) + ); // Team Sidebar - register_sidebar( array( - 'name' => __( 'Front page - Team Sidebar', 'illdy' ), - 'id' => 'front-page-team-sidebar', - 'description' => __( 'The widgets added in this sidebar will appear in team section from front page.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '', - 'after_title' => '', - ) ); + register_sidebar( + array( + 'name' => __( 'Front page - Team Sidebar', 'illdy' ), + 'id' => 'front-page-team-sidebar', + 'description' => __( 'The widgets added in this sidebar will appear in team section from front page.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '', + 'after_title' => '', + ) + ); // Full Width - register_sidebar( array( - 'name' => __( 'Front page - Full Width Section', 'illdy' ), - 'id' => 'front-page-full-width-sidebar', - 'description' => __( 'The widgets added in this sidebar will appear in full width section from front page.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '
', - 'after_title' => '
', - ) ); + register_sidebar( + array( + 'name' => __( 'Front page - Full Width Section', 'illdy' ), + 'id' => 'front-page-full-width-sidebar', + 'description' => __( 'The widgets added in this sidebar will appear in full width section from front page.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '
', + 'after_title' => '
', + ) + ); // Testimonial Sidebar - register_sidebar( array( - 'name' => __( 'Front page - Testimonials Sidebar', 'illdy' ), - 'id' => 'front-page-testimonials-sidebar', - 'description' => __( 'The widgets added in this sidebar will appear in testimonials section from front page.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '', - 'after_title' => '', - ) ); + register_sidebar( + array( + 'name' => __( 'Front page - Testimonials Sidebar', 'illdy' ), + 'id' => 'front-page-testimonials-sidebar', + 'description' => __( 'The widgets added in this sidebar will appear in testimonials section from front page.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '', + 'after_title' => '', + ) + ); // WooCommerce Sidebar if ( class_exists( 'WooCommerce' ) ) { - register_sidebar( array( - 'name' => __( 'WooCommerce Sidebar', 'illdy' ), - 'id' => 'woocommerce-sidebar', - 'description' => __( 'The widgets added in this sidebar will appear in WooCommerce pages.', 'illdy' ), - 'before_widget' => '
', - 'after_widget' => '
', - 'before_title' => '
', - 'after_title' => '
', - ) ); + register_sidebar( + array( + 'name' => __( 'WooCommerce Sidebar', 'illdy' ), + 'id' => 'woocommerce-sidebar', + 'description' => __( 'The widgets added in this sidebar will appear in WooCommerce pages.', 'illdy' ), + 'before_widget' => '
', + 'after_widget' => '
', + 'before_title' => '
', + 'after_title' => '
', + ) + ); } } }// End if(). @@ -390,11 +437,13 @@ function illdy_value_checkbox_helper( $value ) { add_action( 'illdy_after_content_above_footer', 'illdy_pagination', 1 ); function illdy_pagination() { - the_posts_pagination( array( - 'prev_text' => '', - 'next_text' => '', - 'screen_reader_text' => '', - ) ); + the_posts_pagination( + array( + 'prev_text' => '', + 'next_text' => '', + 'screen_reader_text' => '', + ) + ); } @@ -407,7 +456,7 @@ function illdy_get_random_featured_image() { 'random-blog-post-4.jpg', 'random-blog-post-5.jpg', ); - $number = rand( 0,4 ); + $number = rand( 0, 4 ); return get_template_directory_uri() . '/layout/images/blog/' . $featured_image_list[ $number ]; } } diff --git a/header.php b/header.php index b1b6b92..ea01bc9 100755 --- a/header.php +++ b/header.php @@ -16,6 +16,7 @@ $jumbotron_parallax_enable = get_theme_mod( 'illdy_jumbotron_enable_parallax_effect', true ); $preloader_enable = get_theme_mod( 'illdy_preloader_enable', 1 ); $is_mobile_safari = preg_match( '/(iPod|iPhone|iPad)/', $_SERVER['HTTP_USER_AGENT'] ); +$accent_color = get_theme_mod( 'epsilon_accent_color', '#f1d204' ); $style = ''; @@ -28,11 +29,15 @@ global $post; if ( has_post_thumbnail( $post->ID ) ) { $style = 'background-image: url(' . esc_url( get_the_post_thumbnail_url( $post->ID, 'full' ) ) . ');'; - } else { + } elseif ( has_header_image() ) { $style = 'background-image: url(' . get_header_image() . ');'; + } else { + $style = 'background-color: ' . $accent_color . ';'; } -} else { +} elseif ( has_header_image() ) { $style = 'background-image: url(' . get_header_image() . ');'; +} else { + $style = 'background-color: ' . $accent_color . ';'; } $url = get_theme_mod( 'header_image', get_theme_support( 'custom-header', 'default-image' ) ); @@ -48,11 +53,23 @@ $style .= 'background-size:contain;background-repeat:no-repeat;'; } +$header_class = ''; + +if ( 'page' == get_option( 'show_on_front' ) && is_front_page() ) { + $header_class = 'header-front-page'; +} else { + $header_class = 'header-blog'; +} + +if ( get_theme_mod( 'illdy_sticky_header_enable', false ) ) { + $header_class .= ' header-has-sticky-menu'; +} + ?> > - + @@ -60,36 +77,39 @@
-