Skip to content

Commit 06447c3

Browse files
authored
Merge pull request #67 from MachoThemes/master
update to 3.2.3
2 parents f05032c + 0493290 commit 06447c3

File tree

5 files changed

+158
-6
lines changed

5 files changed

+158
-6
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
Thumbs.db
1+
Thumbs.db
2+
node_modules/*
3+
.idea/*
4+
fancybox-for-wordpress.zip
5+
.DS_Store
6+
package-lock.json
7+
.standard.json

Gruntfile.js

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
module.exports = function(grunt) {
2+
// load all tasks
3+
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
4+
5+
grunt.initConfig({
6+
pkg: grunt.file.readJSON('package.json'),
7+
checktextdomain: {
8+
standard: {
9+
options:{
10+
text_domain: [ 'fancybox-for-wordpress' ], //Specify allowed domain(s)
11+
create_report_file: "true",
12+
keywords: [ //List keyword specifications
13+
'__:1,2d',
14+
'_e:1,2d',
15+
'_x:1,2c,3d',
16+
'esc_html__:1,2d',
17+
'esc_html_e:1,2d',
18+
'esc_html_x:1,2c,3d',
19+
'esc_attr__:1,2d',
20+
'esc_attr_e:1,2d',
21+
'esc_attr_x:1,2c,3d',
22+
'_ex:1,2c,3d',
23+
'_n:1,2,4d',
24+
'_nx:1,2,4c,5d',
25+
'_n_noop:1,2,3d',
26+
'_nx_noop:1,2,3c,4d'
27+
]
28+
},
29+
files: [{
30+
src: [
31+
'**/*.php',
32+
'!**/node_modules/**',
33+
], //all php
34+
expand: true,
35+
}],
36+
}
37+
},
38+
makepot: {
39+
target: {
40+
options: {
41+
cwd: '', // Directory of files to internationalize.
42+
domainPath: 'languages/', // Where to save the POT file.
43+
exclude: [], // List of files or directories to ignore.
44+
include: [], // List of files or directories to include.
45+
mainFile: 'fancybox.php', // Main project file.
46+
potComments: '', // The copyright at the beginning of the POT file.
47+
potFilename: 'fancybox-for-wordpress.po', // Name of the POT file.
48+
potHeaders: {
49+
poedit: true, // Includes common Poedit headers.
50+
'x-poedit-keywordslist': true // Include a list of all possible gettext functions.
51+
}, // Headers to add to the generated POT file.
52+
processPot: null, // A callback function for manipulating the POT file.
53+
type: 'wp-plugin', // Type of project (wp-plugin or wp-theme).
54+
updateTimestamp: true, // Whether the POT-Creation-Date should be updated without other changes.
55+
updatePoFiles: false // Whether to update PO files in the same directory as the POT file.
56+
}
57+
}
58+
},
59+
clean: {
60+
init: {
61+
src: ['build/']
62+
},
63+
build: {
64+
src: [
65+
'build/*',
66+
'!build/<%= pkg.name %>.zip'
67+
]
68+
}
69+
},
70+
copy: {
71+
build: {
72+
expand: true,
73+
src: [
74+
'**',
75+
'!node_modules/**',
76+
'!vendor/**',
77+
'!build/**',
78+
'!readme.md',
79+
'!README.md',
80+
'!phpcs.ruleset.xml',
81+
'!Gruntfile.js',
82+
'!package.json',
83+
'!package-lock.json',
84+
'!composer.json',
85+
'!composer.lock',
86+
'!set_tags.sh',
87+
'!fancybox-for-wordpress.zip',
88+
'!nbproject/**' ],
89+
dest: 'build/'
90+
}
91+
},
92+
compress: {
93+
build: {
94+
options: {
95+
pretty: true, // Pretty print file sizes when logging.
96+
archive: '<%= pkg.name %>.zip'
97+
},
98+
expand: true,
99+
cwd: 'build/',
100+
src: ['**/*'],
101+
dest: '<%= pkg.name %>/'
102+
}
103+
},
104+
});
105+
106+
grunt.registerTask( 'i18n', ['checktextdomain', 'makepot']);
107+
// Build task
108+
grunt.registerTask( 'build-archive', [
109+
// 'i18n',
110+
'clean:init',
111+
'copy',
112+
'compress:build',
113+
'clean:init'
114+
]);
115+
};

fancybox.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
* Plugin Name: FancyBox for WordPress
44
* Plugin URI: https://wordpress.org/plugins/fancybox-for-wordpress/
55
* Description: Integrates <a href="http://fancyapps.com/fancybox/3/">FancyBox 3</a> into WordPress.
6-
* Version: 3.2.2
6+
* Version: 3.2.3
77
* Author: Colorlib
88
* Author URI: https://colorlib.com/wp/
9-
* Tested up to: 5.1
9+
* Tested up to: 5.2
1010
* Requires: 4.6 or higher
1111
* License: GPLv3 or later
1212
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -36,7 +36,7 @@
3636
* Plugin Init
3737
*/
3838
// Constants
39-
define( 'FBFW_VERSION', '3.2.2' );
39+
define( 'FBFW_VERSION', '3.2.3' );
4040
define( 'FBFW_PATH', plugin_dir_path( __FILE__ ) );
4141
define( 'FBFW_URL', plugin_dir_url( __FILE__ ) );
4242
define( 'FBFW_PLUGIN_BASE', plugin_basename( __FILE__ ) );
@@ -393,6 +393,14 @@ function mfbfw_init() {
393393
arrows: <?php echo ( isset( $mfbfw['showNavArrows'] ) && $mfbfw['showNavArrows'] ? 'true' : 'false' ) ?>,
394394
clickContent: <?php echo ( isset( $mfbfw['hideOnContentClick'] ) && $mfbfw['hideOnContentClick'] ? '"close"' : 'false' ) ?>,
395395
clickSlide: <?php echo ( isset( $mfbfw['hideOnOverlayClick'] ) && $mfbfw['hideOnOverlayClick'] ? '"close"' : 'false' ) ?>,
396+
mobile:{
397+
clickContent: function(current, event) {
398+
return current.type === "image" ? <?php echo ( isset( $mfbfw['hideOnContentClick'] ) && $mfbfw['hideOnContentClick'] ? '"close"' : '"toggleControls"' ) ?> : false;
399+
},
400+
clickSlide: function(current, event) {
401+
return current.type === "image" ? <?php echo ( isset( $mfbfw['hideOnOverlayClick'] ) && $mfbfw['hideOnOverlayClick'] ? '"close"' : '"toggleControls"' ) ?> : "close";
402+
},
403+
},
396404
wheel: <?php echo ( isset( $mfbfw['mouseWheel'] ) && $mfbfw['mouseWheel'] ? 'true' : 'false' ) ?>,
397405
toolbar: <?php echo ( isset( $mfbfw['showToolbar'] ) && $mfbfw['showToolbar'] ? 'true' : 'false' ) ?>,
398406
preventCaptionOverlap: true,

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "fancybox-for-wordpress",
3+
"main": "Gruntfile.js",
4+
"version": "1.2.0",
5+
"homepage": "https://www.colorlib.com",
6+
"author": "Colorlib",
7+
"license": "GPL v3",
8+
"repository": "https://github.com/puikinsh/fancybox-for-wordpress",
9+
"devDependencies": {
10+
"grunt": "^1.0.4",
11+
"grunt-checktextdomain": "^1.0.1",
12+
"grunt-cli": "~1.3.2",
13+
"grunt-contrib-clean": "^2.0.0",
14+
"grunt-contrib-compress": "^1.4.3",
15+
"grunt-contrib-copy": "^1.0.0",
16+
"grunt-wp-i18n": "^1.0.3",
17+
"load-grunt-tasks": "^4.0.0"
18+
}
19+
}

readme.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Contributors: silkalns
33
Tags: fancybox, lightbox, jquery, gallery, image, images, photo, photos, picture, pictures, zoom
44
Requires at least: 4.6
5-
Tested up to: 5.1
6-
Stable tag: 3.2.2
5+
Tested up to: 5.2
6+
Stable tag: 3.2.3
77
License: GPLv3 or later
88
License URI: http://www.gnu.org/licenses/gpl-3.0.html
99

@@ -31,6 +31,10 @@ If you enjoy using FancyBox lightbox for WordPress please leave a [positive feed
3131

3232
== Changelog ==
3333

34+
= 3.2.3 =
35+
* Fix for mobile close on content click
36+
* Fix for mobile close on overlay click
37+
3438
= 3.2.2 =
3539
* Fix for padding issue when title inside position
3640
* Fix for title color when title is set to inside position

0 commit comments

Comments
 (0)