Skip to content

Commit

Permalink
Merge pull request #199 from MachoThemes/master
Browse files Browse the repository at this point in the history
missing div in blog archive page
  • Loading branch information
cristianraiber committed Aug 8, 2017
2 parents 5430285 + 11ab0ee commit 27fbfeb
Show file tree
Hide file tree
Showing 21 changed files with 445 additions and 265 deletions.
67 changes: 41 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,53 @@ matrix:
- php: '5.6'
- php: '7.0'
- php: '7.1'
env: SNIFF=1
env: DEPLOY=1
before_script:
- export PHPCS_DIR=/tmp/phpcs
- export SNIFFS_DIR=/tmp/sniffs
- git clone -b 2.9 --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git $PHPCS_DIR
- git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
$SNIFFS_DIR
- git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git $SNIFFS_DIR/PHPCompatibility
- "$PHPCS_DIR/scripts/phpcs --config-set installed_paths $SNIFFS_DIR"
- phpenv rehash
- npm install -g jscs
- npm install -g jshint
- wget https://develop.svn.wordpress.org/trunk/.jshintrc
- npm install -g grunt-cli
- npm install
- npm install -g grunt-checktextdomain
- if [[ "$SNIFF" == "1" ]]; then git clone -b 2.9 --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git
$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
$SNIFFS_DIR/PHPCompatibility; fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs --config-set installed_paths
$SNIFFS_DIR; fi
- if [[ "$SNIFF" == "1" ]]; then phpenv rehash; fi
- if [[ "$SNIFF" == "1" ]]; then npm install -g jscs; fi
- if [[ "$SNIFF" == "1" ]]; then npm install -g jshint; fi
- if [[ "$SNIFF" == "1" ]]; then wget https://develop.svn.wordpress.org/trunk/.jshintrc;
fi
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install -g grunt-cli;
fi
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install; fi
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install -g grunt-checktextdomain;
fi
script:
- mkdir -p build/logs
- find -L . -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
- jshint ./assets/js/*.js
- jshint ./inc/admin/welcome-screen/js/*.js
- jscs ./assets/js/*.js
- jscs ./inc/admin/welcome-screen/js/*.js
- grunt textdomain
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./*.php --standard=./phpcs.ruleset.xml --extensions=php"
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/*.php --standard=./phpcs.ruleset.xml
--extensions=php"
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/*.php --standard=./phpcs.ruleset.xml
--extensions=php"
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/*.php --standard=./phpcs.ruleset.xml
--extensions=php"
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/*.php --standard=./phpcs.ruleset.xml
--extensions=php"
- if [[ "$SNIFF" == "1" ]]; then jshint ./assets/js/*.js; fi
- if [[ "$SNIFF" == "1" ]]; then jshint ./inc/admin/welcome-screen/js/*.js; fi
- if [[ "$SNIFF" == "1" ]]; then jscs ./assets/js/*.js; fi
- if [[ "$SNIFF" == "1" ]]; then jscs ./inc/admin/welcome-screen/js/*.js; fi
- if [[ "$SNIFF" == "1" ]]; then grunt textdomain; fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./*.php --standard=./phpcs.ruleset.xml
--extensions=php; fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/*.php --standard=./phpcs.ruleset.xml
--extensions=php --ignore=./inc/plugin-activation.php,./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;
fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/*.php
--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;
fi
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/**/*.php
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/**/*.php;
fi
notifications:
email: false
cache:
Expand Down
30 changes: 0 additions & 30 deletions 404.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,6 @@

<?php
get_search_form();

the_widget( 'WP_Widget_Recent_Posts' );

// Only show the widget if site has multiple categories.
if ( shapely_categorized_blog() ) :
?>

<div class="widget widget_categories">
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'shapely' ); ?></h2>
<ul>
<?php
wp_list_categories( array(
'orderby' => 'count',
'order' => 'DESC',
'show_count' => 1,
'title_li' => '',
'number' => 10,
) );
?>
</ul>
</div><!-- .widget -->

<?php
endif;

/* translators: %1$s: smiley */
$archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'shapely' ), convert_smilies( ':)' ) ) . '</p>';
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );

the_widget( 'WP_Widget_Tag_Cloud' );
?>

</div><!-- .page-content -->
Expand Down
Binary file added assets/images/placeholder.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 11 additions & 1 deletion assets/js/shapely-scripts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(function( $ ) {// jscs:ignore validateLineBreaks

var clNav, clNavOuterHeight, windowW, menu, farRight, isOnScreen, difference, videos, recentEntries, searchInterval;
var clNav, clNavOuterHeight, windowW, menu, farRight, isOnScreen, difference, videos, recentEntries, searchInterval, shapelyCf;

jQuery( document ).ready(function( $ ) {

Expand Down Expand Up @@ -315,6 +315,16 @@
jQuery( this ).parents( '.function' ).removeClass( 'active' );
});

// Check if is a contact form 7 with parallax background
shapelyCf = jQuery( '.contact-section.image-bg .wpcf7' );
if ( shapelyCf.length > 0 ) {
shapelyCf.on( 'wpcf7submit', function() {
setTimeout(function() {
jQuery( window ).trigger( 'resize' ).trigger( 'scroll' );
}, 800 );
});
}

});

jQuery( window ).load(function( $ ) {
Expand Down
15 changes: 13 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,15 @@ function shapely_setup() {
global $shapely_required_actions, $shapely_recommended_plugins;

$shapely_recommended_plugins = array(
'wordpress-seo' => array(
'recommended' => true,
'contact-form-7' => array(
'recommended' => false,
),
'fancybox-for-wordpress' => array(
'recommended' => false,
),
'wordpress-seo' => array(
'recommended' => false,
),
);

/*
Expand Down Expand Up @@ -143,6 +146,13 @@ function shapely_setup() {
'check' => Shapely_Notify_System::shapely_has_plugin( 'jetpack' ),
'plugin_slug' => 'jetpack',
),
array(
'id' => 'shapely-req-ac-install-contact-form-7',
'title' => Shapely_Notify_System::shapely_cf7_title(),
'description' => Shapely_Notify_System::shapely_cf7_description(),
'check' => Shapely_Notify_System::shapely_has_plugin( 'contact-form-7' ),
'plugin_slug' => 'contact-form-7',
),
array(
'id' => 'shapely-req-import-content',
'title' => esc_html__( 'Import content', 'shapely' ),
Expand Down Expand Up @@ -343,3 +353,4 @@ function shapely_scripts() {
* Load the system checks ( used for notifications )
*/
require get_template_directory() . '/inc/admin/welcome-screen/class-shapely-notify-system.php';

2 changes: 1 addition & 1 deletion header.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
</div>
</header><!-- #masthead -->
<div id="content" class="main-container">
<?php if ( ! is_page_template( 'page-templates/template-home.php' ) ) : ?>
<?php if ( ! is_page_template( 'page-templates/template-home.php' ) && ! is_404() ) : ?>
<div class="header-callout">
<?php shapely_top_callout(); ?>
</div>
Expand Down
59 changes: 44 additions & 15 deletions inc/admin/welcome-screen/class-shapely-notify-system.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* Class Shapely_Notify_System
*/
class Shapely_Notify_System {
class Shapely_Notify_System extends Epsilon_Notify_System {
/**
* @param $ver
*
Expand Down Expand Up @@ -108,8 +108,8 @@ public static function shapely_check_plugin_is_active( $slug ) {
public static function shapely_has_plugin( $slug = null ) {

$check = array(
'installed' => self::shapely_check_plugin_is_installed( $slug ),
'active' => self::shapely_check_plugin_is_active( $slug ),
'installed' => self::check_plugin_is_installed( $slug ),
'active' => self::check_plugin_is_active( $slug ),
);

if ( ! $check['installed'] || ! $check['active'] ) {
Expand All @@ -120,12 +120,12 @@ public static function shapely_has_plugin( $slug = null ) {
}

public static function shapely_companion_title() {
$installed = self::shapely_check_plugin_is_installed( 'shapely-companion' );
$installed = self::check_plugin_is_installed( 'shapely-companion' );
if ( ! $installed ) {
return esc_html__( 'Install: Shapely Companion Plugin', 'shapely' );
}

$active = self::shapely_check_plugin_is_active( 'shapely-companion' );
$active = self::check_plugin_is_active( 'shapely-companion' );
if ( $installed && ! $active ) {
return esc_html__( 'Activate: Shapely Companion Plugin', 'shapely' );
}
Expand All @@ -134,12 +134,12 @@ public static function shapely_companion_title() {
}

public static function shapely_yoast_title() {
$installed = self::shapely_check_plugin_is_installed( 'wordpress-seo' );
$installed = self::check_plugin_is_installed( 'wordpress-seo' );
if ( ! $installed ) {
return esc_html__( 'Install: Yoast SEO Plugin', 'shapely' );
}

$active = self::shapely_check_plugin_is_active( 'wordpress-seo' );
$active = self::check_plugin_is_active( 'wordpress-seo' );
if ( $installed && ! $active ) {
return esc_html__( 'Activate: Yoast SEO Plugin', 'shapely' );
}
Expand All @@ -148,30 +148,44 @@ public static function shapely_yoast_title() {
}

public static function shapely_jetpack_title() {
$installed = self::shapely_check_plugin_is_installed( 'jetpack' );
$installed = self::check_plugin_is_installed( 'jetpack' );
if ( ! $installed ) {
return esc_html__( 'Install: Jetpack by WordPress', 'shapely' );
}

$active = self::shapely_check_plugin_is_active( 'jetpack' );
$active = self::check_plugin_is_active( 'jetpack' );
if ( $installed && ! $active ) {
return esc_html__( 'Activate: Jetpack by WordPress', 'shapely' );
}

return esc_html__( 'Install: Jetpack by WordPress', 'shapely' );
}

public static function shapely_cf7_title() {
$installed = self::check_plugin_is_installed( 'contac-form-7' );
if ( ! $installed ) {
return esc_html__( 'Install: Contact Form 7', 'shapely' );
}

$active = self::check_plugin_is_active( 'contac-form-7' );
if ( $installed && ! $active ) {
return esc_html__( 'Activate: Contact Form 7', 'shapely' );
}

return esc_html__( 'Install: Contact Form 7', 'shapely' );
}

/**
* @return string
*/
public static function shapely_companion_description() {
$installed = self::shapely_check_plugin_is_installed( 'shapely-companion' );
$installed = self::check_plugin_is_installed( 'shapely-companion' );

if ( ! $installed ) {
return esc_html__( 'Please install Shapely Companion plugin.', 'shapely' );
}

$active = self::shapely_check_plugin_is_active( 'shapely-companion' );
$active = self::check_plugin_is_active( 'shapely-companion' );
if ( $installed && ! $active ) {
return esc_html__( 'Please activate Shapely Companion plugin.', 'shapely' );
}
Expand All @@ -183,27 +197,42 @@ public static function shapely_companion_description() {
* @return string
*/
public static function shapely_jetpack_description() {
$installed = self::shapely_check_plugin_is_installed( 'jetpack' );
$installed = self::check_plugin_is_installed( 'jetpack' );

if ( ! $installed ) {
return esc_html__( 'Please install Jetpack by WordPress. Note that you won\'t be able to use the Testimonials and Portfolio widgets without it.', 'shapely' );
}

$active = self::shapely_check_plugin_is_active( 'jetpack' );
$active = self::check_plugin_is_active( 'jetpack' );
if ( $installed && ! $active ) {
return esc_html__( 'Please activate Jetpack by WordPress. Note that you won\'t be able to use the Testimonials and Portfolio widgets without it.', 'shapely' );
}

return esc_html__( 'Please install Jetpack by WordPress. Note that you won\'t be able to use the Testimonials and Portfolio widgets without it.', 'shapely' );
}

public static function shapely_cf7_description() {
$installed = self::check_plugin_is_installed( 'contac-form-7' );

if ( ! $installed ) {
return esc_html__( 'Please install Contact Form 7. Note that you won\'t be able to use Contact widget without it.', 'shapely' );
}

$active = self::check_plugin_is_active( 'contac-form-7' );
if ( $installed && ! $active ) {
return esc_html__( 'Please activate Contact Form 7. Note that you won\'t be able to use Contact widget without it.', 'shapely' );
}

return esc_html__( 'Please install Contact Form 7. Note that you won\'t be able to use Contact widget without it.', 'shapely' );
}

public static function shapely_yoast_description() {
$installed = self::shapely_check_plugin_is_installed( 'wordpress-seo' );
$installed = self::check_plugin_is_installed( 'wordpress-seo' );
if ( ! $installed ) {
return esc_html__( 'Please install Yoast SEO plugin.', 'shapely' );
}

$active = self::shapely_check_plugin_is_active( 'wordpress-seo' );
$active = self::check_plugin_is_active( 'wordpress-seo' );
if ( $installed && ! $active ) {
return esc_html__( 'Please activate Yoast SEO plugin.', 'shapely' );
}
Expand Down
Loading

0 comments on commit 27fbfeb

Please sign in to comment.