Skip to content

Commit 9640a76

Browse files
author
Cosmin
authored
Merge pull request #195 from MachoThemes/master
Shapely v1.1.6
2 parents f407c4a + 68bf05a commit 9640a76

File tree

77 files changed

+1476
-1384
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1476
-1384
lines changed

.jscsrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"preset": "wordpress",
3+
"fileExtensions": [ ".js" ],
4+
"excludeFiles": [
5+
"assets/js/**.min.js",
6+
"assets/js/owl-carousel/*",
7+
"assets/js/dev/*"
8+
],
9+
"maxErrors": Infinity
10+
}

.jshintrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"boss": true,
3+
"curly": true,
4+
"eqeqeq": true,
5+
"eqnull": true,
6+
"es3": true,
7+
"expr": true,
8+
"immed": true,
9+
"noarg": true,
10+
"nonbsp": true,
11+
"onevar": true,
12+
"quotmark": "single",
13+
"trailing": true,
14+
"undef": true,
15+
"unused": false,
16+
"browser": true,
17+
"globals": {
18+
"jQuery": false,
19+
"wp": false,
20+
"WPUrls": false,
21+
"Masonry": false,
22+
"Vimeo" : false,
23+
"shapelyWelcomeScreenObject" : false,
24+
"console": false,
25+
"shapelyWelcomeScreenCustomizerObject" : false
26+
}
27+
}

.travis.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ matrix:
55
include:
66
- php: '5.3'
77
- php: '5.4'
8+
- php: '5.5'
89
- php: '5.6'
910
- php: '7.0'
1011
- php: '7.1'
@@ -26,22 +27,34 @@ before_script:
2627
script:
2728
- mkdir -p build/logs
2829
- find -L . -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
29-
- jshint ./js/*.js
30-
- jscs ./js/*.js
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
3134
- grunt textdomain
3235
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./*.php --standard=./phpcs.ruleset.xml --extensions=php"
3336
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/*.php --standard=./phpcs.ruleset.xml
34-
--extensions=php --ignore=./woocommerce/*.php,./node_modules/*.php"
37+
--extensions=php"
3538
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/*.php --standard=./phpcs.ruleset.xml
36-
--extensions=php --ignore=./woocommerce/**/*.php,./inc/libraries/class-tgm-plugin-activation.php,./node_modules/**/*.php"
39+
--extensions=php"
3740
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/*.php --standard=./phpcs.ruleset.xml
38-
--extensions=php --ignore=./woocommerce/**/**/*.php,./node_modules/**/**/*.php"
41+
--extensions=php"
3942
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/*.php --standard=./phpcs.ruleset.xml
40-
--extensions=php --ignore=./node_modules/**/**/**/*.php"
41-
- "$PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/**/**/*.php --standard=./phpcs.ruleset.xml
42-
--extensions=php --ignore=./node_modules/**/**/**/**/*.php"
43+
--extensions=php"
4344
notifications:
4445
email: false
4546
cache:
4647
directories:
47-
- node_modules
48+
- node_modules
49+
#after_success:
50+
#- grunt build-archive
51+
#- sh set_tags.sh
52+
#deploy:
53+
# provider: releases
54+
# skip_cleanup: true
55+
# api_key:
56+
# secure: FbV7d4hcOzhBRs1M/iVlseSqeaeHtLhp+Et6iP7kRVEM5rVl9zmFUppfCweQfBm9Gd4SPJkiRPAtYwKIDZwS3AO9U4jkdYOJCAysVa/zEj+t8DSFsA7EwIstu4CbQVEAADCEAmI/Yth8qbe4jF5Xg29/ykF9WCHXUhYnewSDX/Vr+AbjiitmDqojK9Ea9c0iMlVrOZEgnhfGFxLU4dsh4F/Il2pQiermoAz7r4+apvJG5IDIXFRFgY6L1tIEAnFhDgaLHuTN1QtCgoyeFxHLzSBXEjnPatefjRd4VwCLIyG3NnTSdudI9ddAg+r42ghGtslRrIlZHerc9BWFX0zXkLxVCvem126ol+/x9Uvx6TdAfGb2L3tmkquv1QgeOy0ju7mlwdwO2LepcnMwETpkPF9r4iBpT+S0GF5MbUNO6LQdqQ7Lwk4AKpdWZUO0LHdLGw5JhS99GMZZxICnsHRxBBx0DcCMTAFJsUs6RNND/ugulTUHnTtEF97XkB+2Db4CYQLsDq/hg0pnscywh+VwR3w7P91rKCsw400SsfV7FqOoLlgoexOqHVkTm0DSkNi4HN+/n4xpgByoZeIq1UzWqjyHgUACBIkuNDkP9QwSuxzWACHfYPKbl/iw7FlX9ct5mBKf4Eyeb88WufEyU/wTFHrrCXDv2EoYspPEPNvYBvk=
57+
# file: shapely.zip
58+
# on:
59+
# branch: master
60+
# repo: giucu91/shapely

404.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,25 @@
2626
the_widget( 'WP_Widget_Recent_Posts' );
2727

2828
// Only show the widget if site has multiple categories.
29-
if ( shapely_categorized_blog() ) :
29+
if ( shapely_categorized_blog() ) :
3030
?>
3131

3232
<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-
33+
<h2 class="widget-title"><?php esc_html_e( 'Most Used Categories', 'shapely' ); ?></h2>
34+
<ul>
4735
<?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
4848
endif;
4949

5050
/* translators: %1$s: smiley */

Gruntfile.js

Lines changed: 125 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,54 @@ module.exports = function( grunt ) {
66

77
grunt.config.init( {
88
pkg: grunt.file.readJSON( 'package.json' ),
9+
10+
dirs: {
11+
css: 'assets/css',
12+
js: 'assets/js'
13+
},
14+
15+
makepot: {
16+
target: {
17+
options: {
18+
domainPath: '/languages/',
19+
potFilename: '<%= pkg.name %>.pot',
20+
potHeaders: {
21+
poedit: true,
22+
'x-poedit-keywordslist': true
23+
},
24+
processPot: function( pot, options ) {
25+
pot.headers[ 'report-msgid-bugs-to' ] = 'https://www.colorlib.com/';
26+
pot.headers[ 'language-team' ] = 'Colorlib <[email protected]>';
27+
pot.headers[ 'last-translator' ] = 'Colorlib <[email protected]>';
28+
pot.headers[ 'language-team' ] = 'Colorlib <[email protected]>';
29+
return pot;
30+
},
31+
updateTimestamp: true,
32+
type: 'wp-theme'
33+
34+
}
35+
}
36+
},
37+
38+
addtextdomain: {
39+
target: {
40+
options: {
41+
updateDomains: true,
42+
textdomain: '<%= pkg.name %>'
43+
},
44+
files: {
45+
src: [
46+
'*.php',
47+
'!node_modules/**'
48+
]
49+
}
50+
}
51+
},
52+
953
checktextdomain: {
1054
standard: {
1155
options: {
12-
text_domain: [ 'shapely' ], //Specify allowed
13-
// domain(s)
56+
text_domain: [ 'shapely', 'epsilon-framework' ], //Specify allowed domain(s)
1457
create_report_file: 'true',
1558
keywords: [ //List keyword specifications
1659
'__:1,2d',
@@ -33,12 +76,78 @@ module.exports = function( grunt ) {
3376
{
3477
src: [
3578
'**/*.php',
36-
'!**/node_modules/**'
79+
'!**/node_modules/**',
3780
], //all php
3881
expand: true
3982
} ]
4083
}
41-
}
84+
},
85+
86+
clean: {
87+
init: {
88+
src: [ 'build/' ]
89+
},
90+
build: {
91+
src: [
92+
'build/*',
93+
'!build/<%= pkg.name %>.zip'
94+
]
95+
},
96+
},
97+
98+
copy: {
99+
build: {
100+
expand: true,
101+
src: [
102+
'**',
103+
'!node_modules/**',
104+
'!build/**',
105+
'!readme.md',
106+
'!README.md',
107+
'!phpcs.ruleset.xml',
108+
'!Gruntfile.js',
109+
'!package.json',
110+
'!set_tags.sh',
111+
'!shapely.zip',
112+
'!nbproject/**' ],
113+
dest: 'build/'
114+
}
115+
},
116+
117+
compress: {
118+
build: {
119+
options: {
120+
pretty: true,
121+
archive: '<%= pkg.name %>.zip'
122+
},
123+
expand: true,
124+
cwd: 'build/',
125+
src: [ '**/*' ],
126+
dest: '<%= pkg.name %>/'
127+
}
128+
},
129+
130+
imagemin: {
131+
jpg: {
132+
options: {
133+
progressive: true
134+
}
135+
},
136+
png: {
137+
options: {
138+
optimizationLevel: 7
139+
}
140+
},
141+
dynamic: {
142+
files: [
143+
{
144+
expand: true,
145+
cwd: 'assets/img/',
146+
src: [ '**/*.{png,jpg,gif}' ],
147+
dest: 'assets/img/'
148+
} ]
149+
}
150+
},
42151

43152
} );
44153

@@ -47,4 +156,16 @@ module.exports = function( grunt ) {
47156
'checktextdomain'
48157
] );
49158

159+
// Minify Images
160+
grunt.registerTask( 'minimg', [
161+
'imagemin:dynamic'
162+
] );
163+
164+
// Build task
165+
grunt.registerTask( 'build-archive', [
166+
'clean:init',
167+
'copy',
168+
'compress:build',
169+
'clean:init'
170+
] );
50171
};

archive-jetpack-portfolio.php

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
<?php
2-
/**
3-
* The template for displaying Jetpack Porfolio archive pages.
4-
*
5-
* @link https://codex.wordpress.org/Template_Hierarchy
6-
*
7-
* @package Shapely
8-
*/
9-
102
get_header(); ?>
113

124
<div id="primary" class="content-area col-md-12 mb-xs-24">
@@ -30,24 +22,26 @@
3022
<div class="masonry masonryFlyIn">
3123
<?php
3224
/* Start the Loop */
33-
while ( have_posts() ) : the_post(); ?>
25+
while ( have_posts() ) : the_post();
26+
$projects_args = array(
27+
'fields' => 'names',
28+
);
29+
$project_types = wp_get_post_terms( $post->ID, 'jetpack-portfolio-type', $projects_args );
30+
?>
3431

35-
<article
36-
id="post-<?php the_ID(); ?>" <?php post_class( 'post-snippet col-md-3 col-sm-6 masonry-item project' ); ?>>
32+
<article id="post-<?php the_ID(); ?>" <?php post_class( 'post-snippet col-md-3 col-sm-6 masonry-item project' ); ?>>
3733
<div class="image-tile inner-title hover-reveal text-center"><?php
38-
if ( has_post_thumbnail() ) { ?>
39-
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(array( 'echo' => false )); ?>">
34+
if ( has_post_thumbnail() ) { ?>
35+
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
4036
<?php the_post_thumbnail( 'medium' ); ?>
4137
<div class="title"><?php
42-
the_title( '<h5 class="mb0">', '</h5>' );
43-
44-
$project_types = wp_get_post_terms( $post->ID, 'jetpack-portfolio-type', array( "fields" => "names" ) );
45-
if ( ! empty( $project_types ) ) {
46-
echo '<span>' . implode( ' / ', $project_types ) . '</span>';
47-
} ?>
38+
the_title( '<h5 class="mb0">', '</h5>' );
39+
if ( ! empty( $project_types ) ) {
40+
echo '<span>' . implode( ' / ', $project_types ) . '</span>';
41+
} ?>
4842
</div>
4943
</a><?php
50-
} ?>
44+
} ?>
5145
</div>
5246
</article><!-- #post-## --><?php
5347

archive.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,34 @@
1010
<?php $layout_class = shapely_get_layout_class();?>
1111
<div class="row">
1212
<?php
13-
if ( $layout_class == 'sidebar-left' ):
13+
if ( 'sidebar-left' == $layout_class ) :
1414
get_sidebar();
1515
endif;
1616
?>
1717
<div id="primary" class="col-md-8 mb-xs-24 <?php echo esc_attr( $layout_class ); ?>"><?php
18-
if ( have_posts() ) :
18+
if ( have_posts() ) :
1919

20-
if ( is_home() && ! is_front_page() ) : ?>
20+
if ( is_home() && ! is_front_page() ) : ?>
2121
<header>
2222
<h1 class="page-title screen-reader-text"><?php esc_html( single_post_title() ); ?></h1>
2323
</header>
2424

2525
<?php
2626
endif;
2727

28-
$layout_type = get_theme_mod( 'blog_layout_view', 'grid' );
28+
$layout_type = get_theme_mod( 'blog_layout_view', 'grid' );
29+
$layout_type = str_replace( '_', '-', $layout_type );
2930

30-
get_template_part( 'template-parts/layouts/blog', $layout_type );
31+
get_template_part( 'template-parts/layouts/blog', $layout_type );
3132

32-
shapely_pagination();
33+
shapely_pagination();
3334
else :
3435
get_template_part( 'template-parts/content', 'none' );
3536

3637
endif; ?>
3738
</div><!-- #primary -->
3839
<?php
39-
if ( $layout_class == 'sidebar-right' ):
40+
if ( 'sidebar-right' == $layout_class ) :
4041
get_sidebar();
4142
endif; ?>
4243
</div>

0 commit comments

Comments
 (0)