Skip to content

Commit a743878

Browse files
authored
Merge pull request #27 from Alimir/develop
v3.3
2 parents c32328f + 5709d0b commit a743878

Some content is hidden

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

53 files changed

+1837
-1449
lines changed

Gruntfile.js

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ module.exports = function(grunt) {
104104
outputStyle: 'expanded' // nested, expanded, compact, compressed.
105105
}
106106
}
107-
},
107+
},
108108

109109
// Generate POT file
110110
makepot: {
@@ -168,7 +168,7 @@ module.exports = function(grunt) {
168168
frontJsScripts: {
169169
options: {
170170

171-
banner: "/*! <%= meta.version %>\n" +
171+
banner: "/*! <%= meta.version %>\n" +
172172
" * <%= pkg.homepage %>\n" +
173173
" * <%= meta.copyright %>;\n" +
174174
" */\n",
@@ -186,10 +186,10 @@ module.exports = function(grunt) {
186186
dest: 'assets/js/wp-ulike.js'
187187
},
188188

189-
adminJsScripts: {
189+
adminJsStatistics: {
190190
options: {
191191

192-
banner: "/*! <%= meta.version %>\n" +
192+
banner: "/*! <%= meta.version %>\n" +
193193
" * <%= pkg.homepage %>\n" +
194194
" * <%= meta.copyright %>;\n" +
195195
" */\n",
@@ -204,6 +204,26 @@ module.exports = function(grunt) {
204204
'admin/assets/js/src/scripts.js',
205205
],
206206
dest: 'admin/assets/js/statistics.js'
207+
},
208+
209+
adminJsSettings: {
210+
options: {
211+
212+
banner: "/*! <%= meta.version %>\n" +
213+
" * <%= pkg.homepage %>\n" +
214+
" * <%= meta.copyright %>;\n" +
215+
" */\n",
216+
217+
process: function(src, filepath) {
218+
var separator = "\n\n/* ================== " + filepath + " =================== */\n\n\n";
219+
return (separator + src).replace(/;\s*$/, "") + ";"; // make sure always a semicolon is at the end
220+
},
221+
},
222+
src: [
223+
'admin/assets/js/src/settings/visual-select.js',
224+
'admin/assets/js/src/settings/panel.js',
225+
],
226+
dest: 'admin/assets/js/settings.js'
207227
}
208228

209229
},
@@ -218,7 +238,7 @@ module.exports = function(grunt) {
218238
'assets/css/wp-ulike.min.css': ['assets/css/wp-ulike.css']
219239
}
220240
}
221-
},
241+
},
222242

223243
clean: {
224244
build: [
@@ -234,12 +254,12 @@ module.exports = function(grunt) {
234254
options: {
235255
mangle: true,
236256
preserveComments: 'some'
237-
},
257+
},
238258

239259
frontJsScripts: {
240260
src: '<%= concat.frontJsScripts.dest %>',
241261
dest: 'assets/js/wp-ulike.min.js'
242-
}
262+
}
243263
},
244264

245265
preprocess : {
@@ -344,9 +364,14 @@ module.exports = function(grunt) {
344364
tasks: ['concat:frontJsScripts', 'uglify:frontJsScripts']
345365
},
346366

347-
concat_admin_js_scripts: {
367+
concat_admin_js_statistics: {
348368
files: ['admin/assets/js/src/*.js'],
349-
tasks: ['concat:adminJsScripts']
369+
tasks: ['concat:adminJsStatistics']
370+
},
371+
372+
concat_admin_js_settings: {
373+
files: ['admin/assets/js/src/settings/*.js'],
374+
tasks: ['concat:adminJsSettings']
350375
},
351376

352377
livereload: {
@@ -356,7 +381,7 @@ module.exports = function(grunt) {
356381
'assets/img/**/*.{png,jpg,jpeg,gif,webp,svg}'
357382
]
358383
}
359-
},
384+
},
360385

361386
// deploy via rsync
362387
deploy: {

admin/admin-ajax.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
/**
1212
* AJAX handler to store the state of dismissible notices.
1313
*
14-
* @author Alimir
14+
* @author Alimir
1515
* @since 2.9
1616
* @return Void
17-
*/
17+
*/
1818
function wp_ulike_ajax_notice_handler() {
1919
// Store it in the options table
2020
update_option( 'wp-ulike-notice-dismissed', TRUE );
@@ -24,7 +24,7 @@ function wp_ulike_ajax_notice_handler() {
2424
/**
2525
* Remove logs from tables
2626
*
27-
* @author Alimir
27+
* @author Alimir
2828
* @since 2.1
2929
* @return Void
3030
*/

0 commit comments

Comments
 (0)