Skip to content

Commit 27fbfeb

Browse files
Merge pull request #199 from MachoThemes/master
missing div in blog archive page
2 parents 5430285 + 11ab0ee commit 27fbfeb

21 files changed

+445
-265
lines changed

.travis.yml

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,38 +9,53 @@ matrix:
99
- php: '5.6'
1010
- php: '7.0'
1111
- php: '7.1'
12+
env: SNIFF=1
13+
env: DEPLOY=1
1214
before_script:
1315
- export PHPCS_DIR=/tmp/phpcs
1416
- export SNIFFS_DIR=/tmp/sniffs
15-
- git clone -b 2.9 --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git $PHPCS_DIR
16-
- git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
17-
$SNIFFS_DIR
18-
- git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git $SNIFFS_DIR/PHPCompatibility
19-
- "$PHPCS_DIR/scripts/phpcs --config-set installed_paths $SNIFFS_DIR"
20-
- phpenv rehash
21-
- npm install -g jscs
22-
- npm install -g jshint
23-
- wget https://develop.svn.wordpress.org/trunk/.jshintrc
24-
- npm install -g grunt-cli
25-
- npm install
26-
- npm install -g grunt-checktextdomain
17+
- if [[ "$SNIFF" == "1" ]]; then git clone -b 2.9 --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git
18+
$PHPCS_DIR; fi
19+
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
20+
$SNIFFS_DIR; fi
21+
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git
22+
$SNIFFS_DIR/PHPCompatibility; fi
23+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs --config-set installed_paths
24+
$SNIFFS_DIR; fi
25+
- if [[ "$SNIFF" == "1" ]]; then phpenv rehash; fi
26+
- if [[ "$SNIFF" == "1" ]]; then npm install -g jscs; fi
27+
- if [[ "$SNIFF" == "1" ]]; then npm install -g jshint; fi
28+
- if [[ "$SNIFF" == "1" ]]; then wget https://develop.svn.wordpress.org/trunk/.jshintrc;
29+
fi
30+
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install -g grunt-cli;
31+
fi
32+
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install; fi
33+
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install -g grunt-checktextdomain;
34+
fi
2735
script:
2836
- mkdir -p build/logs
2937
- find -L . -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
30-
- jshint ./assets/js/*.js
31-
- jshint ./inc/admin/welcome-screen/js/*.js
32-
- jscs ./assets/js/*.js
33-
- jscs ./inc/admin/welcome-screen/js/*.js
34-
- grunt textdomain
35-
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./*.php --standard=./phpcs.ruleset.xml --extensions=php"
36-
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/*.php --standard=./phpcs.ruleset.xml
37-
--extensions=php"
38-
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/*.php --standard=./phpcs.ruleset.xml
39-
--extensions=php"
40-
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/*.php --standard=./phpcs.ruleset.xml
41-
--extensions=php"
42-
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/*.php --standard=./phpcs.ruleset.xml
43-
--extensions=php"
38+
- if [[ "$SNIFF" == "1" ]]; then jshint ./assets/js/*.js; fi
39+
- if [[ "$SNIFF" == "1" ]]; then jshint ./inc/admin/welcome-screen/js/*.js; fi
40+
- if [[ "$SNIFF" == "1" ]]; then jscs ./assets/js/*.js; fi
41+
- if [[ "$SNIFF" == "1" ]]; then jscs ./inc/admin/welcome-screen/js/*.js; fi
42+
- if [[ "$SNIFF" == "1" ]]; then grunt textdomain; fi
43+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./*.php --standard=./phpcs.ruleset.xml
44+
--extensions=php; fi
45+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/*.php --standard=./phpcs.ruleset.xml
46+
--extensions=php --ignore=./inc/plugin-activation.php,./node_modules/*.php; fi
47+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/*.php
48+
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/*.php;
49+
fi
50+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/*.php
51+
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/*.php;
52+
fi
53+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/*.php
54+
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/*.php;
55+
fi
56+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/**/*.php
57+
--standard=./phpcs.ruleset.xml --extensions=php --ignore=./node_modules/**/**/**/**/*.php;
58+
fi
4459
notifications:
4560
email: false
4661
cache:

404.php

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,6 @@
2222

2323
<?php
2424
get_search_form();
25-
26-
the_widget( 'WP_Widget_Recent_Posts' );
27-
28-
// Only show the widget if site has multiple categories.
29-
if ( shapely_categorized_blog() ) :
30-
?>
31-
32-
<div class="widget widget_categories">
33-
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'shapely' ); ?></h2>
34-
<ul>
35-
<?php
36-
wp_list_categories( array(
37-
'orderby' => 'count',
38-
'order' => 'DESC',
39-
'show_count' => 1,
40-
'title_li' => '',
41-
'number' => 10,
42-
) );
43-
?>
44-
</ul>
45-
</div><!-- .widget -->
46-
47-
<?php
48-
endif;
49-
50-
/* translators: %1$s: smiley */
51-
$archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'shapely' ), convert_smilies( ':)' ) ) . '</p>';
52-
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
53-
54-
the_widget( 'WP_Widget_Tag_Cloud' );
5525
?>
5626

5727
</div><!-- .page-content -->

assets/images/placeholder.jpg

15.5 KB
Loading

assets/js/shapely-scripts.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function( $ ) {// jscs:ignore validateLineBreaks
22

3-
var clNav, clNavOuterHeight, windowW, menu, farRight, isOnScreen, difference, videos, recentEntries, searchInterval;
3+
var clNav, clNavOuterHeight, windowW, menu, farRight, isOnScreen, difference, videos, recentEntries, searchInterval, shapelyCf;
44

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

@@ -315,6 +315,16 @@
315315
jQuery( this ).parents( '.function' ).removeClass( 'active' );
316316
});
317317

318+
// Check if is a contact form 7 with parallax background
319+
shapelyCf = jQuery( '.contact-section.image-bg .wpcf7' );
320+
if ( shapelyCf.length > 0 ) {
321+
shapelyCf.on( 'wpcf7submit', function() {
322+
setTimeout(function() {
323+
jQuery( window ).trigger( 'resize' ).trigger( 'scroll' );
324+
}, 800 );
325+
});
326+
}
327+
318328
});
319329

320330
jQuery( window ).load(function( $ ) {

functions.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,15 @@ function shapely_setup() {
104104
global $shapely_required_actions, $shapely_recommended_plugins;
105105

106106
$shapely_recommended_plugins = array(
107-
'wordpress-seo' => array(
108-
'recommended' => true,
107+
'contact-form-7' => array(
108+
'recommended' => false,
109109
),
110110
'fancybox-for-wordpress' => array(
111111
'recommended' => false,
112112
),
113+
'wordpress-seo' => array(
114+
'recommended' => false,
115+
),
113116
);
114117

115118
/*
@@ -143,6 +146,13 @@ function shapely_setup() {
143146
'check' => Shapely_Notify_System::shapely_has_plugin( 'jetpack' ),
144147
'plugin_slug' => 'jetpack',
145148
),
149+
array(
150+
'id' => 'shapely-req-ac-install-contact-form-7',
151+
'title' => Shapely_Notify_System::shapely_cf7_title(),
152+
'description' => Shapely_Notify_System::shapely_cf7_description(),
153+
'check' => Shapely_Notify_System::shapely_has_plugin( 'contact-form-7' ),
154+
'plugin_slug' => 'contact-form-7',
155+
),
146156
array(
147157
'id' => 'shapely-req-import-content',
148158
'title' => esc_html__( 'Import content', 'shapely' ),
@@ -343,3 +353,4 @@ function shapely_scripts() {
343353
* Load the system checks ( used for notifications )
344354
*/
345355
require get_template_directory() . '/inc/admin/welcome-screen/class-shapely-notify-system.php';
356+

header.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
</div>
5858
</header><!-- #masthead -->
5959
<div id="content" class="main-container">
60-
<?php if ( ! is_page_template( 'page-templates/template-home.php' ) ) : ?>
60+
<?php if ( ! is_page_template( 'page-templates/template-home.php' ) && ! is_404() ) : ?>
6161
<div class="header-callout">
6262
<?php shapely_top_callout(); ?>
6363
</div>

inc/admin/welcome-screen/class-shapely-notify-system.php

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/**
55
* Class Shapely_Notify_System
66
*/
7-
class Shapely_Notify_System {
7+
class Shapely_Notify_System extends Epsilon_Notify_System {
88
/**
99
* @param $ver
1010
*
@@ -108,8 +108,8 @@ public static function shapely_check_plugin_is_active( $slug ) {
108108
public static function shapely_has_plugin( $slug = null ) {
109109

110110
$check = array(
111-
'installed' => self::shapely_check_plugin_is_installed( $slug ),
112-
'active' => self::shapely_check_plugin_is_active( $slug ),
111+
'installed' => self::check_plugin_is_installed( $slug ),
112+
'active' => self::check_plugin_is_active( $slug ),
113113
);
114114

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

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

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

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

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

150150
public static function shapely_jetpack_title() {
151-
$installed = self::shapely_check_plugin_is_installed( 'jetpack' );
151+
$installed = self::check_plugin_is_installed( 'jetpack' );
152152
if ( ! $installed ) {
153153
return esc_html__( 'Install: Jetpack by WordPress', 'shapely' );
154154
}
155155

156-
$active = self::shapely_check_plugin_is_active( 'jetpack' );
156+
$active = self::check_plugin_is_active( 'jetpack' );
157157
if ( $installed && ! $active ) {
158158
return esc_html__( 'Activate: Jetpack by WordPress', 'shapely' );
159159
}
160160

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

164+
public static function shapely_cf7_title() {
165+
$installed = self::check_plugin_is_installed( 'contac-form-7' );
166+
if ( ! $installed ) {
167+
return esc_html__( 'Install: Contact Form 7', 'shapely' );
168+
}
169+
170+
$active = self::check_plugin_is_active( 'contac-form-7' );
171+
if ( $installed && ! $active ) {
172+
return esc_html__( 'Activate: Contact Form 7', 'shapely' );
173+
}
174+
175+
return esc_html__( 'Install: Contact Form 7', 'shapely' );
176+
}
177+
164178
/**
165179
* @return string
166180
*/
167181
public static function shapely_companion_description() {
168-
$installed = self::shapely_check_plugin_is_installed( 'shapely-companion' );
182+
$installed = self::check_plugin_is_installed( 'shapely-companion' );
169183

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

174-
$active = self::shapely_check_plugin_is_active( 'shapely-companion' );
188+
$active = self::check_plugin_is_active( 'shapely-companion' );
175189
if ( $installed && ! $active ) {
176190
return esc_html__( 'Please activate Shapely Companion plugin.', 'shapely' );
177191
}
@@ -183,27 +197,42 @@ public static function shapely_companion_description() {
183197
* @return string
184198
*/
185199
public static function shapely_jetpack_description() {
186-
$installed = self::shapely_check_plugin_is_installed( 'jetpack' );
200+
$installed = self::check_plugin_is_installed( 'jetpack' );
187201

188202
if ( ! $installed ) {
189203
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' );
190204
}
191205

192-
$active = self::shapely_check_plugin_is_active( 'jetpack' );
206+
$active = self::check_plugin_is_active( 'jetpack' );
193207
if ( $installed && ! $active ) {
194208
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' );
195209
}
196210

197211
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' );
198212
}
199213

214+
public static function shapely_cf7_description() {
215+
$installed = self::check_plugin_is_installed( 'contac-form-7' );
216+
217+
if ( ! $installed ) {
218+
return esc_html__( 'Please install Contact Form 7. Note that you won\'t be able to use Contact widget without it.', 'shapely' );
219+
}
220+
221+
$active = self::check_plugin_is_active( 'contac-form-7' );
222+
if ( $installed && ! $active ) {
223+
return esc_html__( 'Please activate Contact Form 7. Note that you won\'t be able to use Contact widget without it.', 'shapely' );
224+
}
225+
226+
return esc_html__( 'Please install Contact Form 7. Note that you won\'t be able to use Contact widget without it.', 'shapely' );
227+
}
228+
200229
public static function shapely_yoast_description() {
201-
$installed = self::shapely_check_plugin_is_installed( 'wordpress-seo' );
230+
$installed = self::check_plugin_is_installed( 'wordpress-seo' );
202231
if ( ! $installed ) {
203232
return esc_html__( 'Please install Yoast SEO plugin.', 'shapely' );
204233
}
205234

206-
$active = self::shapely_check_plugin_is_active( 'wordpress-seo' );
235+
$active = self::check_plugin_is_active( 'wordpress-seo' );
207236
if ( $installed && ! $active ) {
208237
return esc_html__( 'Please activate Yoast SEO plugin.', 'shapely' );
209238
}

0 commit comments

Comments
 (0)