Skip to content

Commit 6e7fb0e

Browse files
author
Cosmin
authored
Activello v1.3.2
Bug fixing, travis integration ( for CI )
2 parents 283ed37 + d1bc91f commit 6e7fb0e

File tree

83 files changed

+2833
-1947
lines changed

Some content is hidden

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

83 files changed

+2833
-1947
lines changed

.jscsrc

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

.jshintrc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
"activelloNUX": false,
21+
"ajaxurl": false
22+
}
23+
}

.travis.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
sudo: false
2+
language: php
3+
matrix:
4+
fast_finish: true
5+
include:
6+
- php: '5.3'
7+
env: SNIFF=1
8+
- php: '5.4'
9+
- php: '5.5'
10+
- php: '5.6'
11+
- php: '7.0'
12+
- php: '7.1'
13+
env: DEPLOY=1
14+
before_script:
15+
- export PHPCS_DIR=/tmp/phpcs
16+
- export SNIFFS_DIR=/tmp/sniffs
17+
- if [[ "$SNIFF" == "1" ]]; then git clone -b 2.9 --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git $PHPCS_DIR; fi
18+
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git $SNIFFS_DIR; fi
19+
- if [[ "$SNIFF" == "1" ]]; then git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git $SNIFFS_DIR/PHPCompatibility; fi
20+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs --config-set installed_paths $SNIFFS_DIR; fi
21+
- if [[ "$SNIFF" == "1" ]]; then phpenv rehash; fi
22+
- if [[ "$SNIFF" == "1" ]]; then npm install -g jscs; fi
23+
- if [[ "$SNIFF" == "1" ]]; then npm install -g jshint; fi
24+
- if [[ "$SNIFF" == "1" ]]; then wget https://develop.svn.wordpress.org/trunk/.jshintrc; fi
25+
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install -g grunt-cli; fi
26+
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install; fi
27+
- if [[ "$SNIFF" == "1" ]] || [[ "$DEPLOY" == "1" ]]; then npm install -g grunt-checktextdomain; fi
28+
script:
29+
- mkdir -p build/logs
30+
- find -L . -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
31+
- if [[ "$SNIFF" == "1" ]]; then jshint ./assets/js/*.js; fi
32+
- if [[ "$SNIFF" == "1" ]]; then jscs ./assets/js/*.js; fi
33+
- if [[ "$SNIFF" == "1" ]]; then grunt textdomain; fi
34+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./*.php --standard=./phpcs.ruleset.xml --extensions=php; fi
35+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/*.php --standard=./phpcs.ruleset.xml --extensions=php; fi
36+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/*.php --standard=./phpcs.ruleset.xml --extensions=php; fi
37+
- if [[ "$SNIFF" == "1" ]]; then $PHPCS_DIR/scripts/phpcs -p -s -v -n ./**/**/**/*.php --standard=./phpcs.ruleset.xml --extensions=php; fi
38+
notifications:
39+
email: false
40+
cache:
41+
directories:
42+
- node_modules
43+
after_success:
44+
- if [[ "$DEPLOY" == "1" ]]; then grunt build-archive; fi
45+
- if [[ "$DEPLOY" == "1" ]]; then sh set_tags.sh; fi
46+
deploy:
47+
provider: releases
48+
skip_cleanup: true
49+
api_key:
50+
secure: VuMTincGHOH/YopkV/2CdDIR+AKbpnddz1NHdgfY2kdtVU0ZGjQ5e2hUUV6EOLhLy0kgxopPlCSgUP6OHWISQHkE/8ojOfq/NaSY8KstJR3RjhTUgNfdtCowJfOFutvOR02m47a8wJwOcTaav2Qh9e9UrX6TsnlXYNCXd3yxW8feZXckGILi4gbTouimFMkXIGvQ7TzNjX13uXCwFzpd6k8PcWfXHcmFh9q/vUzu2SdXt6ubD3J2mbi6M7CgFHJ3BP/6rGlvAah7gJsABRV531J93EoXm+WoyLrl48gWrnHPVK3WtZvicf5/I/1M4FCnjxPNL4qbWLXamaauOZQBlJTMQNftOYnUmtlIhiGVoFwunGPtaey9FemEx6w3Xt5xjKyvWX4xf3gKptYioexWKLbAi9TJekIOmH5bdhiQXAatAvUrSbiEUcLwUR6S3t6xa4aawgAQgxT0Qc6N9peQN6Wf6KnhBcNJwNKxm2TvU+yF8AwUwCC6O4scJuHvU+8NScUzbaMOkb59gu4Z99E/l5pclahdQNxI7DPpyxERWYIfj84+XIOVzJCfIxczUZMLzCdjRKhByodIyTsHRjfilMgM+wz3aAiSn95M7BVx3BAtS4gZA0pa3eOGMgZ72lKrsstBdOVn9+UU00S/vQOxnn41JxgzGlpnIKbwXeXXk5o=
51+
file: activello.zip
52+
on:
53+
branch: master
54+
repo: puikinsh/Activello
55+
condition: "$DEPLOY = 1"

404.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<div class="row">
2424
<div class="col-md-6 not-found-widget">
25-
<?php the_widget( 'WP_Widget_Recent_Posts', 'title='.esc_html__( 'Recent Posts', 'activello' ) ); ?>
25+
<?php the_widget( 'WP_Widget_Recent_Posts', 'title=' . esc_html__( 'Recent Posts', 'activello' ) ); ?>
2626
</div>
2727

2828
<div class="col-md-6 not-found-widget">
@@ -50,12 +50,12 @@
5050
<?php
5151
/* translators: %1$s: smiley */
5252
$archive_content = '<p>' . sprintf( esc_html__( 'Try looking in the monthly archives. %1$s', 'activello' ), convert_smilies( ':)' ) ) . '</p>';
53-
the_widget( 'WP_Widget_Archives', 'dropdown=1&title='.esc_html__( 'Archives', 'activello' ), "after_title=</h2>$archive_content" );
53+
the_widget( 'WP_Widget_Archives', 'dropdown=1&title=' . esc_html__( 'Archives', 'activello' ), "after_title=</h2>$archive_content" );
5454
?>
5555
</div>
5656

5757
<div class="col-md-6 not-found-widget">
58-
<?php the_widget( 'WP_Widget_Tag_Cloud', 'title='.esc_html__( 'Tags', 'activello' ) ); ?>
58+
<?php the_widget( 'WP_Widget_Tag_Cloud', 'title=' . esc_html__( 'Tags', 'activello' ) ); ?>
5959
</div>
6060
</div>
6161

Gruntfile.js

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
'use strict';
2+
3+
module.exports = function( grunt ) {
4+
// load all tasks
5+
require( 'load-grunt-tasks' )( grunt, { scope: 'devDependencies' } );
6+
7+
grunt.config.init( {
8+
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+
53+
checktextdomain: {
54+
standard: {
55+
options: {
56+
text_domain: [ 'activello', 'epsilon-framework' ], //Specify allowed domain(s)
57+
create_report_file: 'true',
58+
keywords: [ //List keyword specifications
59+
'__:1,2d',
60+
'_e:1,2d',
61+
'_x:1,2c,3d',
62+
'esc_html__:1,2d',
63+
'esc_html_e:1,2d',
64+
'esc_html_x:1,2c,3d',
65+
'esc_attr__:1,2d',
66+
'esc_attr_e:1,2d',
67+
'esc_attr_x:1,2c,3d',
68+
'_ex:1,2c,3d',
69+
'_n:1,2,4d',
70+
'_nx:1,2,4c,5d',
71+
'_n_noop:1,2,3d',
72+
'_nx_noop:1,2,3c,4d'
73+
]
74+
},
75+
files: [
76+
{
77+
src: [
78+
'**/*.php',
79+
'!**/node_modules/**',
80+
], //all php
81+
expand: true
82+
} ]
83+
}
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+
readme: {
100+
src: 'readme.md',
101+
dest: 'build/readme.txt'
102+
},
103+
build: {
104+
expand: true,
105+
src: [
106+
'**',
107+
'!node_modules/**',
108+
'!vendor/**',
109+
'!build/**',
110+
'!readme.md',
111+
'!README.md',
112+
'!phpcs.ruleset.xml',
113+
'!Gruntfile.js',
114+
'!package.json',
115+
'!composer.json',
116+
'!composer.lock',
117+
'!set_tags.sh',
118+
'!activello.zip',
119+
'!nbproject/**' ],
120+
dest: 'build/'
121+
}
122+
},
123+
124+
compress: {
125+
build: {
126+
options: {
127+
pretty: true,
128+
archive: '<%= pkg.name %>.zip'
129+
},
130+
expand: true,
131+
cwd: 'build/',
132+
src: [ '**/*' ],
133+
dest: '<%= pkg.name %>/'
134+
}
135+
},
136+
137+
imagemin: {
138+
jpg: {
139+
options: {
140+
progressive: true
141+
}
142+
},
143+
png: {
144+
options: {
145+
optimizationLevel: 7
146+
}
147+
},
148+
dynamic: {
149+
files: [
150+
{
151+
expand: true,
152+
cwd: 'assets/img/',
153+
src: [ '**/*.{png,jpg,gif}' ],
154+
dest: 'assets/img/'
155+
} ]
156+
}
157+
},
158+
159+
} );
160+
161+
// Check Missing Text Domain Strings
162+
grunt.registerTask( 'textdomain', [
163+
'checktextdomain'
164+
] );
165+
166+
// Minify Images
167+
grunt.registerTask( 'minimg', [
168+
'imagemin:dynamic'
169+
] );
170+
171+
// Build task
172+
grunt.registerTask( 'build-archive', [
173+
'clean:init',
174+
'copy',
175+
'compress:build',
176+
'clean:init'
177+
] );
178+
};

archive.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,36 @@
1717
<header class="page-header">
1818
<h1 class="page-title">
1919
<?php
20-
if ( is_category() ) :
21-
single_cat_title();
20+
if ( is_category() ) :
21+
single_cat_title();
2222

2323
elseif ( is_tag() ) :
2424
single_tag_title();
2525

2626
elseif ( is_author() ) :
27+
/* translators: %s: author name */
2728
printf( esc_html__( 'Author: %s', 'activello' ), '<span class="vcard">' . get_the_author() . '</span>' );
2829

2930
elseif ( is_day() ) :
31+
/* translators: %s: day */
3032
printf( esc_html__( 'Day: %s', 'activello' ), '<span>' . get_the_date() . '</span>' );
3133

3234
elseif ( is_month() ) :
35+
/* translators: %s: month */
3336
printf( esc_html__( 'Month: %s', 'activello' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'activello' ) ) . '</span>' );
3437

3538
elseif ( is_year() ) :
39+
/* translators: %s: year */
3640
printf( esc_html__( 'Year: %s', 'activello' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'activello' ) ) . '</span>' );
3741

3842
elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
3943
esc_html_e( 'Asides', 'activello' );
4044

4145
elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :
42-
esc_html_e( 'Galleries', 'activello');
46+
esc_html_e( 'Galleries', 'activello' );
4347

4448
elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
45-
esc_html_e( 'Images', 'activello');
49+
esc_html_e( 'Images', 'activello' );
4650

4751
elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
4852
esc_html_e( 'Videos', 'activello' );
@@ -71,8 +75,8 @@
7175
<?php
7276
// Show an optional term description.
7377
$term_description = term_description();
74-
if ( ! empty( $term_description ) ) :
75-
printf( '<div class="taxonomy-description">%s</div>', $term_description );
78+
if ( ! empty( $term_description ) ) :
79+
printf( '<div class="taxonomy-description">%s</div>', $term_description );
7680
endif;
7781
?>
7882
</header><!-- .page-header -->
@@ -85,7 +89,7 @@
8589
* If you want to override this in a child theme, then include a file
8690
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
8791
*/
88-
get_template_part( 'content', get_post_format() );
92+
get_template_part( 'template-parts/content', get_post_format() );
8993
?>
9094

9195
<?php endwhile; ?>
@@ -94,12 +98,12 @@
9498

9599
<?php else : ?>
96100

97-
<?php get_template_part( 'content', 'none' ); ?>
101+
<?php get_template_part( 'template-parts/content', 'none' ); ?>
98102

99103
<?php endif; ?>
100104

101105
</main><!-- #main -->
102106
</section><!-- #primary -->
103107

104108
<?php get_sidebar(); ?>
105-
<?php get_footer(); ?>
109+
<?php get_footer(); ?>

assets/css/admin.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)