Version Description
- Update: PHP 5.6 Compatibility
- Add: PHPCS configuration
- Add: GitHub Issue templates
Download this release
Release Info
Developer | Archetyped |
Plugin | Simple Lightbox |
Version | 2.8.1 |
Comparing to | |
See all releases |
Code changes from version 2.8.0 to 2.8.1
- .gitignore +2 -1
- changelog.txt +6 -0
- composer.json +8 -0
- composer.lock +340 -0
- includes/class-requirements-check.php +1 -1
- includes/class.field_base.php +8 -1
- includes/class.fields.php +1 -1
- main.php +2 -2
- package-lock.json +1 -1
- package.json +1 -1
- phpcs.xml.dist +128 -0
- readme.txt +7 -1
.gitignore
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
.vscode
|
2 |
.sass-cache
|
3 |
-
node_modules/
|
|
1 |
.vscode
|
2 |
.sass-cache
|
3 |
+
node_modules/
|
4 |
+
vendor/
|
changelog.txt
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= 2.8.0 =
|
2 |
|
3 |
* Update: WordPress 5.3+ required.
|
1 |
+
= 2.8.1 =
|
2 |
+
|
3 |
+
* Update: PHP 5.6 Compatibility
|
4 |
+
* Add: PHPCS configuration
|
5 |
+
* Add: GitHub Issue templates
|
6 |
+
|
7 |
= 2.8.0 =
|
8 |
|
9 |
* Update: WordPress 5.3+ required.
|
composer.json
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"require-dev": {
|
3 |
+
"squizlabs/php_codesniffer": "^3.5",
|
4 |
+
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2",
|
5 |
+
"wp-coding-standards/wpcs": "^2.2",
|
6 |
+
"phpcompatibility/phpcompatibility-wp": "*"
|
7 |
+
}
|
8 |
+
}
|
composer.lock
ADDED
@@ -0,0 +1,340 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_readme": [
|
3 |
+
"This file locks the dependencies of your project to a known state",
|
4 |
+
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
5 |
+
"This file is @generated automatically"
|
6 |
+
],
|
7 |
+
"content-hash": "d58ae19bd7c4cf76ada3935405677c26",
|
8 |
+
"packages": [],
|
9 |
+
"packages-dev": [
|
10 |
+
{
|
11 |
+
"name": "dealerdirect/phpcodesniffer-composer-installer",
|
12 |
+
"version": "v0.6.2",
|
13 |
+
"source": {
|
14 |
+
"type": "git",
|
15 |
+
"url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
|
16 |
+
"reference": "8001af8eb107fbfcedc31a8b51e20b07d85b457a"
|
17 |
+
},
|
18 |
+
"dist": {
|
19 |
+
"type": "zip",
|
20 |
+
"url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/8001af8eb107fbfcedc31a8b51e20b07d85b457a",
|
21 |
+
"reference": "8001af8eb107fbfcedc31a8b51e20b07d85b457a",
|
22 |
+
"shasum": ""
|
23 |
+
},
|
24 |
+
"require": {
|
25 |
+
"composer-plugin-api": "^1.0",
|
26 |
+
"php": "^5.3|^7",
|
27 |
+
"squizlabs/php_codesniffer": "^2|^3"
|
28 |
+
},
|
29 |
+
"require-dev": {
|
30 |
+
"composer/composer": "*",
|
31 |
+
"phpcompatibility/php-compatibility": "^9.0",
|
32 |
+
"sensiolabs/security-checker": "^4.1.0"
|
33 |
+
},
|
34 |
+
"type": "composer-plugin",
|
35 |
+
"extra": {
|
36 |
+
"class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
|
37 |
+
},
|
38 |
+
"autoload": {
|
39 |
+
"psr-4": {
|
40 |
+
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
|
41 |
+
}
|
42 |
+
},
|
43 |
+
"notification-url": "https://packagist.org/downloads/",
|
44 |
+
"license": [
|
45 |
+
"MIT"
|
46 |
+
],
|
47 |
+
"authors": [
|
48 |
+
{
|
49 |
+
"name": "Franck Nijhof",
|
50 |
+
"email": "franck.nijhof@dealerdirect.com",
|
51 |
+
"homepage": "http://www.frenck.nl",
|
52 |
+
"role": "Developer / IT Manager"
|
53 |
+
}
|
54 |
+
],
|
55 |
+
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
|
56 |
+
"homepage": "http://www.dealerdirect.com",
|
57 |
+
"keywords": [
|
58 |
+
"PHPCodeSniffer",
|
59 |
+
"PHP_CodeSniffer",
|
60 |
+
"code quality",
|
61 |
+
"codesniffer",
|
62 |
+
"composer",
|
63 |
+
"installer",
|
64 |
+
"phpcs",
|
65 |
+
"plugin",
|
66 |
+
"qa",
|
67 |
+
"quality",
|
68 |
+
"standard",
|
69 |
+
"standards",
|
70 |
+
"style guide",
|
71 |
+
"stylecheck",
|
72 |
+
"tests"
|
73 |
+
],
|
74 |
+
"time": "2020-01-29T20:22:20+00:00"
|
75 |
+
},
|
76 |
+
{
|
77 |
+
"name": "phpcompatibility/php-compatibility",
|
78 |
+
"version": "9.3.5",
|
79 |
+
"source": {
|
80 |
+
"type": "git",
|
81 |
+
"url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
|
82 |
+
"reference": "9fb324479acf6f39452e0655d2429cc0d3914243"
|
83 |
+
},
|
84 |
+
"dist": {
|
85 |
+
"type": "zip",
|
86 |
+
"url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243",
|
87 |
+
"reference": "9fb324479acf6f39452e0655d2429cc0d3914243",
|
88 |
+
"shasum": ""
|
89 |
+
},
|
90 |
+
"require": {
|
91 |
+
"php": ">=5.3",
|
92 |
+
"squizlabs/php_codesniffer": "^2.3 || ^3.0.2"
|
93 |
+
},
|
94 |
+
"conflict": {
|
95 |
+
"squizlabs/php_codesniffer": "2.6.2"
|
96 |
+
},
|
97 |
+
"require-dev": {
|
98 |
+
"phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0"
|
99 |
+
},
|
100 |
+
"suggest": {
|
101 |
+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.",
|
102 |
+
"roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
|
103 |
+
},
|
104 |
+
"type": "phpcodesniffer-standard",
|
105 |
+
"notification-url": "https://packagist.org/downloads/",
|
106 |
+
"license": [
|
107 |
+
"LGPL-3.0-or-later"
|
108 |
+
],
|
109 |
+
"authors": [
|
110 |
+
{
|
111 |
+
"name": "Wim Godden",
|
112 |
+
"homepage": "https://github.com/wimg",
|
113 |
+
"role": "lead"
|
114 |
+
},
|
115 |
+
{
|
116 |
+
"name": "Juliette Reinders Folmer",
|
117 |
+
"homepage": "https://github.com/jrfnl",
|
118 |
+
"role": "lead"
|
119 |
+
},
|
120 |
+
{
|
121 |
+
"name": "Contributors",
|
122 |
+
"homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
|
123 |
+
}
|
124 |
+
],
|
125 |
+
"description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
|
126 |
+
"homepage": "http://techblog.wimgodden.be/tag/codesniffer/",
|
127 |
+
"keywords": [
|
128 |
+
"compatibility",
|
129 |
+
"phpcs",
|
130 |
+
"standards"
|
131 |
+
],
|
132 |
+
"time": "2019-12-27T09:44:58+00:00"
|
133 |
+
},
|
134 |
+
{
|
135 |
+
"name": "phpcompatibility/phpcompatibility-paragonie",
|
136 |
+
"version": "1.3.0",
|
137 |
+
"source": {
|
138 |
+
"type": "git",
|
139 |
+
"url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git",
|
140 |
+
"reference": "b862bc32f7e860d0b164b199bd995e690b4b191c"
|
141 |
+
},
|
142 |
+
"dist": {
|
143 |
+
"type": "zip",
|
144 |
+
"url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/b862bc32f7e860d0b164b199bd995e690b4b191c",
|
145 |
+
"reference": "b862bc32f7e860d0b164b199bd995e690b4b191c",
|
146 |
+
"shasum": ""
|
147 |
+
},
|
148 |
+
"require": {
|
149 |
+
"phpcompatibility/php-compatibility": "^9.0"
|
150 |
+
},
|
151 |
+
"require-dev": {
|
152 |
+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5",
|
153 |
+
"paragonie/random_compat": "dev-master",
|
154 |
+
"paragonie/sodium_compat": "dev-master"
|
155 |
+
},
|
156 |
+
"suggest": {
|
157 |
+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
|
158 |
+
"roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
|
159 |
+
},
|
160 |
+
"type": "phpcodesniffer-standard",
|
161 |
+
"notification-url": "https://packagist.org/downloads/",
|
162 |
+
"license": [
|
163 |
+
"LGPL-3.0-or-later"
|
164 |
+
],
|
165 |
+
"authors": [
|
166 |
+
{
|
167 |
+
"name": "Wim Godden",
|
168 |
+
"role": "lead"
|
169 |
+
},
|
170 |
+
{
|
171 |
+
"name": "Juliette Reinders Folmer",
|
172 |
+
"role": "lead"
|
173 |
+
}
|
174 |
+
],
|
175 |
+
"description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.",
|
176 |
+
"homepage": "http://phpcompatibility.com/",
|
177 |
+
"keywords": [
|
178 |
+
"compatibility",
|
179 |
+
"paragonie",
|
180 |
+
"phpcs",
|
181 |
+
"polyfill",
|
182 |
+
"standards"
|
183 |
+
],
|
184 |
+
"time": "2019-11-04T15:17:54+00:00"
|
185 |
+
},
|
186 |
+
{
|
187 |
+
"name": "phpcompatibility/phpcompatibility-wp",
|
188 |
+
"version": "2.1.0",
|
189 |
+
"source": {
|
190 |
+
"type": "git",
|
191 |
+
"url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git",
|
192 |
+
"reference": "41bef18ba688af638b7310666db28e1ea9158b2f"
|
193 |
+
},
|
194 |
+
"dist": {
|
195 |
+
"type": "zip",
|
196 |
+
"url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/41bef18ba688af638b7310666db28e1ea9158b2f",
|
197 |
+
"reference": "41bef18ba688af638b7310666db28e1ea9158b2f",
|
198 |
+
"shasum": ""
|
199 |
+
},
|
200 |
+
"require": {
|
201 |
+
"phpcompatibility/php-compatibility": "^9.0",
|
202 |
+
"phpcompatibility/phpcompatibility-paragonie": "^1.0"
|
203 |
+
},
|
204 |
+
"require-dev": {
|
205 |
+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5"
|
206 |
+
},
|
207 |
+
"suggest": {
|
208 |
+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.",
|
209 |
+
"roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues."
|
210 |
+
},
|
211 |
+
"type": "phpcodesniffer-standard",
|
212 |
+
"notification-url": "https://packagist.org/downloads/",
|
213 |
+
"license": [
|
214 |
+
"LGPL-3.0-or-later"
|
215 |
+
],
|
216 |
+
"authors": [
|
217 |
+
{
|
218 |
+
"name": "Wim Godden",
|
219 |
+
"role": "lead"
|
220 |
+
},
|
221 |
+
{
|
222 |
+
"name": "Juliette Reinders Folmer",
|
223 |
+
"role": "lead"
|
224 |
+
}
|
225 |
+
],
|
226 |
+
"description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.",
|
227 |
+
"homepage": "http://phpcompatibility.com/",
|
228 |
+
"keywords": [
|
229 |
+
"compatibility",
|
230 |
+
"phpcs",
|
231 |
+
"standards",
|
232 |
+
"wordpress"
|
233 |
+
],
|
234 |
+
"time": "2019-08-28T14:22:28+00:00"
|
235 |
+
},
|
236 |
+
{
|
237 |
+
"name": "squizlabs/php_codesniffer",
|
238 |
+
"version": "3.5.4",
|
239 |
+
"source": {
|
240 |
+
"type": "git",
|
241 |
+
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
242 |
+
"reference": "dceec07328401de6211037abbb18bda423677e26"
|
243 |
+
},
|
244 |
+
"dist": {
|
245 |
+
"type": "zip",
|
246 |
+
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dceec07328401de6211037abbb18bda423677e26",
|
247 |
+
"reference": "dceec07328401de6211037abbb18bda423677e26",
|
248 |
+
"shasum": ""
|
249 |
+
},
|
250 |
+
"require": {
|
251 |
+
"ext-simplexml": "*",
|
252 |
+
"ext-tokenizer": "*",
|
253 |
+
"ext-xmlwriter": "*",
|
254 |
+
"php": ">=5.4.0"
|
255 |
+
},
|
256 |
+
"require-dev": {
|
257 |
+
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
258 |
+
},
|
259 |
+
"bin": [
|
260 |
+
"bin/phpcs",
|
261 |
+
"bin/phpcbf"
|
262 |
+
],
|
263 |
+
"type": "library",
|
264 |
+
"extra": {
|
265 |
+
"branch-alias": {
|
266 |
+
"dev-master": "3.x-dev"
|
267 |
+
}
|
268 |
+
},
|
269 |
+
"notification-url": "https://packagist.org/downloads/",
|
270 |
+
"license": [
|
271 |
+
"BSD-3-Clause"
|
272 |
+
],
|
273 |
+
"authors": [
|
274 |
+
{
|
275 |
+
"name": "Greg Sherwood",
|
276 |
+
"role": "lead"
|
277 |
+
}
|
278 |
+
],
|
279 |
+
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
280 |
+
"homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
|
281 |
+
"keywords": [
|
282 |
+
"phpcs",
|
283 |
+
"standards"
|
284 |
+
],
|
285 |
+
"time": "2020-01-30T22:20:29+00:00"
|
286 |
+
},
|
287 |
+
{
|
288 |
+
"name": "wp-coding-standards/wpcs",
|
289 |
+
"version": "2.2.1",
|
290 |
+
"source": {
|
291 |
+
"type": "git",
|
292 |
+
"url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
|
293 |
+
"reference": "b5a453203114cc2284b1a614c4953456fbe4f546"
|
294 |
+
},
|
295 |
+
"dist": {
|
296 |
+
"type": "zip",
|
297 |
+
"url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/b5a453203114cc2284b1a614c4953456fbe4f546",
|
298 |
+
"reference": "b5a453203114cc2284b1a614c4953456fbe4f546",
|
299 |
+
"shasum": ""
|
300 |
+
},
|
301 |
+
"require": {
|
302 |
+
"php": ">=5.4",
|
303 |
+
"squizlabs/php_codesniffer": "^3.3.1"
|
304 |
+
},
|
305 |
+
"require-dev": {
|
306 |
+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6",
|
307 |
+
"phpcompatibility/php-compatibility": "^9.0",
|
308 |
+
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
309 |
+
},
|
310 |
+
"suggest": {
|
311 |
+
"dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
|
312 |
+
},
|
313 |
+
"type": "phpcodesniffer-standard",
|
314 |
+
"notification-url": "https://packagist.org/downloads/",
|
315 |
+
"license": [
|
316 |
+
"MIT"
|
317 |
+
],
|
318 |
+
"authors": [
|
319 |
+
{
|
320 |
+
"name": "Contributors",
|
321 |
+
"homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors"
|
322 |
+
}
|
323 |
+
],
|
324 |
+
"description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
|
325 |
+
"keywords": [
|
326 |
+
"phpcs",
|
327 |
+
"standards",
|
328 |
+
"wordpress"
|
329 |
+
],
|
330 |
+
"time": "2020-02-04T02:52:06+00:00"
|
331 |
+
}
|
332 |
+
],
|
333 |
+
"aliases": [],
|
334 |
+
"minimum-stability": "stable",
|
335 |
+
"stability-flags": [],
|
336 |
+
"prefer-stable": false,
|
337 |
+
"prefer-lowest": false,
|
338 |
+
"platform": [],
|
339 |
+
"platform-dev": []
|
340 |
+
}
|
includes/class-requirements-check.php
CHANGED
@@ -34,7 +34,7 @@ class SLB_Requirements_Check {
|
|
34 |
* @var array
|
35 |
*/
|
36 |
private $deps = array(
|
37 |
-
'php' => '5.
|
38 |
);
|
39 |
|
40 |
/**
|
34 |
* @var array
|
35 |
*/
|
36 |
private $deps = array(
|
37 |
+
'php' => '5.6.20',
|
38 |
);
|
39 |
|
40 |
/**
|
includes/class.field_base.php
CHANGED
@@ -491,9 +491,16 @@ class SLB_Field_Base extends SLB_Base {
|
|
491 |
* @param bool $overwrite Optional. Overwrite existing format. Default false.
|
492 |
* @return void
|
493 |
*/
|
494 |
-
protected function add_id_format(
|
495 |
// Init ID formats before adding new ones.
|
496 |
$this->init_id_formats();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
497 |
// Do not add format if name matches existing format (when overwriting not allowed).
|
498 |
if ( ! $overwrite && in_array( $name, array_keys( $this->id_formats ) ) ) {
|
499 |
return;
|
491 |
* @param bool $overwrite Optional. Overwrite existing format. Default false.
|
492 |
* @return void
|
493 |
*/
|
494 |
+
protected function add_id_format( $name, array $options, $overwrite = false ) {
|
495 |
// Init ID formats before adding new ones.
|
496 |
$this->init_id_formats();
|
497 |
+
// Validate args.
|
498 |
+
$name = trim($name);
|
499 |
+
// Stop if name invalid.
|
500 |
+
if ( empty( $name ) ) {
|
501 |
+
return;
|
502 |
+
}
|
503 |
+
$overwrite = (bool) $overwrite;
|
504 |
// Do not add format if name matches existing format (when overwriting not allowed).
|
505 |
if ( ! $overwrite && in_array( $name, array_keys( $this->id_formats ) ) ) {
|
506 |
return;
|
includes/class.fields.php
CHANGED
@@ -390,7 +390,7 @@ class SLB_Fields extends SLB_Field_Collection {
|
|
390 |
*
|
391 |
* @return string Processed value.
|
392 |
*/
|
393 |
-
function process_placeholder_data_ext(
|
394 |
$key = ( isset( $placeholder['attributes']['id'] ) ) ? $placeholder['attributes']['id'] : false;
|
395 |
if ( !! $key && isset( $data[ $key ] ) && is_scalar( $data[ $key ] ) ) {
|
396 |
$output = strval( $data[ $key ] );
|
390 |
*
|
391 |
* @return string Processed value.
|
392 |
*/
|
393 |
+
function process_placeholder_data_ext( $output, SLB_Field $item, array $placeholder, $layout, array $data ) {
|
394 |
$key = ( isset( $placeholder['attributes']['id'] ) ) ? $placeholder['attributes']['id'] : false;
|
395 |
if ( !! $key && isset( $data[ $key ] ) && is_scalar( $data[ $key ] ) ) {
|
396 |
$output = strval( $data[ $key ] );
|
main.php
CHANGED
@@ -9,9 +9,9 @@
|
|
9 |
* Plugin Name: Simple Lightbox
|
10 |
* Plugin URI: http://archetyped.com/tools/simple-lightbox/
|
11 |
* Description: The highly customizable lightbox for WordPress
|
12 |
-
* Version: 2.8.
|
13 |
* Requires at least: 5.3
|
14 |
-
* Requires PHP:
|
15 |
* Text Domain: simple-lightbox
|
16 |
* Domain Path: /l10n
|
17 |
* Author: Archetyped
|
9 |
* Plugin Name: Simple Lightbox
|
10 |
* Plugin URI: http://archetyped.com/tools/simple-lightbox/
|
11 |
* Description: The highly customizable lightbox for WordPress
|
12 |
+
* Version: 2.8.1
|
13 |
* Requires at least: 5.3
|
14 |
+
* Requires PHP: 5.6.20
|
15 |
* Text Domain: simple-lightbox
|
16 |
* Domain Path: /l10n
|
17 |
* Author: Archetyped
|
package-lock.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"name": "simple-lightbox",
|
3 |
-
"version": "2.8.
|
4 |
"lockfileVersion": 1,
|
5 |
"requires": true,
|
6 |
"dependencies": {
|
1 |
{
|
2 |
"name": "simple-lightbox",
|
3 |
+
"version": "2.8.1",
|
4 |
"lockfileVersion": 1,
|
5 |
"requires": true,
|
6 |
"dependencies": {
|
package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"name": "simple-lightbox",
|
3 |
-
"version": "2.8.
|
4 |
"title": "Simple Lightbox",
|
5 |
"description": "The highly-customizable lightbox for WordPress",
|
6 |
"author": "Archetyped <support@archetyped.com>",
|
1 |
{
|
2 |
"name": "simple-lightbox",
|
3 |
+
"version": "2.8.1",
|
4 |
"title": "Simple Lightbox",
|
5 |
"description": "The highly-customizable lightbox for WordPress",
|
6 |
"author": "Archetyped <support@archetyped.com>",
|
phpcs.xml.dist
ADDED
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<ruleset name="AR/WP/Plugin ruleset">
|
3 |
+
|
4 |
+
<description>Custom ruleset for AR/WP/Plugins</description>
|
5 |
+
|
6 |
+
<!-- Show progress in all reports. -->
|
7 |
+
<arg value="p"/>
|
8 |
+
|
9 |
+
<!-- A path to strip from the front of file paths inside reports. -->
|
10 |
+
<arg name="basepath" value="."/>
|
11 |
+
<arg name="colors"/>
|
12 |
+
<arg name="extensions" value="php"/>
|
13 |
+
|
14 |
+
<!-- Exclude the Composer Vendor directory. -->
|
15 |
+
<exclude-pattern>/vendor/*</exclude-pattern>
|
16 |
+
|
17 |
+
<!-- Exclude the Node Modules directory. -->
|
18 |
+
<exclude-pattern>/node_modules/*</exclude-pattern>
|
19 |
+
|
20 |
+
<!-- Set minimum supported WordPress version -->
|
21 |
+
<config name="minimum_supported_wp_version" value="5.3"/>
|
22 |
+
|
23 |
+
<!-- Check for PHP cross-version compatibility. -->
|
24 |
+
<config name="testVersion" value="5.6-"/>
|
25 |
+
<rule ref="PHPCompatibilityWP"/>
|
26 |
+
|
27 |
+
<!-- Include the WordPress standard. -->
|
28 |
+
<rule ref="WordPress-Extra">
|
29 |
+
<!-- Use PSR-4 file naming standard instead -->
|
30 |
+
<exclude name="WordPress.Files.FileName"/>
|
31 |
+
<!-- Allow short array syntax -->
|
32 |
+
<exclude name="Generic.Arrays.DisallowShortArraySyntax"/>
|
33 |
+
<!-- Temporarily exclude rules -->
|
34 |
+
<!-- ** WordPress-Specific ** -->
|
35 |
+
<exclude name="WordPress.Arrays.CommaAfterArrayItem.NoComma"/>
|
36 |
+
<exclude name="WordPress.CodeAnalysis.AssignmentInCondition.Found"/>
|
37 |
+
<exclude name="WordPress.CodeAnalysis.AssignmentInCondition.FoundInTernaryCondition"/>
|
38 |
+
<exclude name="WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition"/>
|
39 |
+
<exclude name="WordPress.DB.PreparedSQL.InterpolatedNotPrepared"/>
|
40 |
+
<exclude name="WordPress.DB.PreparedSQL.NotPrepared"/>
|
41 |
+
<exclude name="WordPress.PHP.DontExtract.extract_extract"/>
|
42 |
+
<exclude name="WordPress.PHP.NoSilencedErrors.Discouraged"/>
|
43 |
+
<exclude name="WordPress.PHP.PregQuoteDelimiter.Missing"/>
|
44 |
+
<exclude name="WordPress.PHP.StrictComparisons.LooseComparison"/>
|
45 |
+
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict"/>
|
46 |
+
<exclude name="WordPress.PHP.YodaConditions.NotYoda"/>
|
47 |
+
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped"/>
|
48 |
+
<exclude name="WordPress.Security.NonceVerification.Missing"/>
|
49 |
+
<exclude name="WordPress.Security.NonceVerification.Recommended"/>
|
50 |
+
<exclude name="WordPress.WP.AlternativeFunctions.json_encode_json_encode"/>
|
51 |
+
<exclude name="WordPress.WP.AlternativeFunctions.parse_url_parse_url"/>
|
52 |
+
<exclude name="WordPress.WP.AlternativeFunctions.rand_mt_rand"/>
|
53 |
+
<exclude name="WordPress.WP.AlternativeFunctions.strip_tags_strip_tags"/>
|
54 |
+
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited"/>
|
55 |
+
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment"/>
|
56 |
+
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralText"/>
|
57 |
+
<!-- ** Standard ** -->
|
58 |
+
<exclude name="Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed"/>
|
59 |
+
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed"/>
|
60 |
+
<exclude name="Generic.Files.EndFileNewline.NotFound"/>
|
61 |
+
<exclude name="Generic.Files.LineEndings.InvalidEOLChar"/>
|
62 |
+
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine"/>
|
63 |
+
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket"/>
|
64 |
+
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments"/>
|
65 |
+
<exclude name="PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.Changed"/>
|
66 |
+
<exclude name="PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection"/>
|
67 |
+
<exclude name="PSR2.Classes.PropertyDeclaration.ScopeMissing"/>
|
68 |
+
<exclude name="PSR2.Classes.PropertyDeclaration.Underscore"/>
|
69 |
+
<exclude name="PSR2.Classes.PropertyDeclaration.VarUsed"/>
|
70 |
+
<exclude name="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment"/>
|
71 |
+
<exclude name="PSR2.Files.ClosingTag.NotAllowed"/>
|
72 |
+
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/>
|
73 |
+
<exclude name="Squiz.Operators.IncrementDecrementUsage.NoBrackets"/>
|
74 |
+
<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
|
75 |
+
<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found"/>
|
76 |
+
<exclude name="Squiz.PHP.DisallowMultipleAssignments.FoundInControlStructure"/>
|
77 |
+
<exclude name="Squiz.PHP.DisallowSizeFunctionsInLoops.Found"/>
|
78 |
+
<exclude name="Squiz.PHP.Eval.Discouraged"/>
|
79 |
+
<exclude name="Squiz.PHP.NonExecutableCode.Unreachable"/>
|
80 |
+
<exclude name="Squiz.Scope.MethodScope.Missing"/>
|
81 |
+
<exclude name="Squiz.Strings.DoubleQuoteUsage.NotRequired"/>
|
82 |
+
<!-- ** Spacing-Related ** -->
|
83 |
+
<exclude name="Generic.Formatting.SpaceAfterCast.NoSpace"/>
|
84 |
+
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.NoSpaceAfterComma"/>
|
85 |
+
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.SpaceBeforeBrace"/>
|
86 |
+
<exclude name="Generic.WhiteSpace.ArbitraryParenthesesSpacing.SpaceAfterOpen"/>
|
87 |
+
<exclude name="Generic.WhiteSpace.ArbitraryParenthesesSpacing.SpaceBeforeClose"/>
|
88 |
+
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed"/>
|
89 |
+
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact"/>
|
90 |
+
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket"/>
|
91 |
+
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket"/>
|
92 |
+
<exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonCASE"/>
|
93 |
+
<exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonDEFAULT"/>
|
94 |
+
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace"/>
|
95 |
+
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword"/>
|
96 |
+
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpen"/>
|
97 |
+
<exclude name="Squiz.PHP.EmbeddedPhp.SpacingBeforeClose"/>
|
98 |
+
<exclude name="Squiz.Strings.ConcatenationSpacing.PaddingFound"/>
|
99 |
+
<exclude name="Squiz.WhiteSpace.SemicolonSpacing.Incorrect"/>
|
100 |
+
<exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines"/>
|
101 |
+
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound"/>
|
102 |
+
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceAfterArrayOpener"/>
|
103 |
+
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.NoSpaceBeforeArrayCloser"/>
|
104 |
+
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing.SpaceAfterKeyword"/>
|
105 |
+
<exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys"/>
|
106 |
+
<exclude name="WordPress.Arrays.CommaAfterArrayItem.NoSpaceAfterComma"/>
|
107 |
+
<exclude name="WordPress.WhiteSpace.CastStructureSpacing.NoSpaceBeforeOpenParenthesis"/>
|
108 |
+
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceAfterCloseParenthesis"/>
|
109 |
+
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceBeforeCloseParenthesis"/>
|
110 |
+
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis"/>
|
111 |
+
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis"/>
|
112 |
+
<exclude name="WordPress.WhiteSpace.DisallowInlineTabs.NonIndentTabsUsed"/>
|
113 |
+
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter"/>
|
114 |
+
<exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore"/>
|
115 |
+
<exclude name="WordPress.WhiteSpace.OperatorSpacing.SpacingAfter"/>
|
116 |
+
<!-- ** Alignment-Related ** -->
|
117 |
+
<exclude name="WordPress.Arrays.ArrayIndentation.CloseBraceNotAligned"/>
|
118 |
+
<exclude name="WordPress.Arrays.ArrayIndentation.ItemNotAligned"/>
|
119 |
+
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned"/>
|
120 |
+
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning"/>
|
121 |
+
</rule>
|
122 |
+
|
123 |
+
<!-- Add in some extra rules from other standards. -->
|
124 |
+
<!-- <rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/> -->
|
125 |
+
<!-- <rule ref="Generic.Commenting.Todo"/> -->
|
126 |
+
<rule ref="Squiz.Commenting.FunctionComment.SpacingAfter"/>
|
127 |
+
|
128 |
+
</ruleset>
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ License: GPLv2
|
|
5 |
Tags: lightbox, gallery, photography, images, theme, template, style
|
6 |
Requires at least: 5.3
|
7 |
Tested up to: 5.3
|
8 |
-
Requires PHP:
|
9 |
Stable tag: trunk
|
10 |
|
11 |
The highly customizable lightbox for WordPress
|
@@ -64,6 +64,12 @@ Get more information on [Simple Lightbox's official page](http://archetyped.com/
|
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
= 2.8.0 =
|
68 |
|
69 |
* Update: WordPress 5.3+ required.
|
5 |
Tags: lightbox, gallery, photography, images, theme, template, style
|
6 |
Requires at least: 5.3
|
7 |
Tested up to: 5.3
|
8 |
+
Requires PHP: 5.6.20
|
9 |
Stable tag: trunk
|
10 |
|
11 |
The highly customizable lightbox for WordPress
|
64 |
|
65 |
== Changelog ==
|
66 |
|
67 |
+
= 2.8.1 =
|
68 |
+
|
69 |
+
* Update: PHP 5.6 Compatibility
|
70 |
+
* Add: PHPCS configuration
|
71 |
+
* Add: GitHub Issue templates
|
72 |
+
|
73 |
= 2.8.0 =
|
74 |
|
75 |
* Update: WordPress 5.3+ required.
|