Version Description
- [Fixed] FileBird compatibility
- [Fixed] Frontend content builders compatibility
Download this release
Release Info
Developer | Kubitomakita |
Plugin | Easy Watermark |
Version | 1.0.3 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.3
- assets/dist/scripts/uploader.js +1 -1
- easy-watermark.php +1 -1
- readme.txt +5 -1
- src/classes/Core/Assets.php +10 -1
- src/classes/Features/AutoWatermarkSwitch.php +1 -1
assets/dist/scripts/uploader.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="../",r(r.s=15)}({0:function(e,t){e.exports=jQuery},15:function(e,t,r){"use strict";r.r(t);var a=r(0),n=r.n(a);r(26);if("undefined"!=typeof wp&&"function"==typeof wp.Uploader
|
1 |
+
!function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="../",r(r.s=15)}({0:function(e,t){e.exports=jQuery},15:function(e,t,r){"use strict";r.r(t);var a=r(0),n=r.n(a);r(26);n()(document).ready(()=>{if("undefined"!=typeof wp&&"function"==typeof wp.Uploader){const e=wp.Uploader;wp.Uploader=class extends e{init(){super.init(),this.updateAutoWatermarkParam=this.updateAutoWatermarkParam.bind(this),n()("body").on("change",".ew-watermark-all-switch input",this.updateAutoWatermarkParam),this.param("auto_watermark",ew.autoWatermark)}updateAutoWatermarkParam(e){ew.autoWatermark=n()(e.target).is(":checked"),this.param("auto_watermark",ew.autoWatermark)}}}if("undefined"!=typeof wp&&"function"==typeof wp.media.view.UploaderInline){const e=wp.media.view.UploaderInline;wp.media.view.UploaderInline=e.extend({render(){e.prototype.render.apply(this,arguments),this.$el.hasClass("hidden")||this.$el.find(".ew-watermark-all-switch input").prop("checked",ew.autoWatermark)}})}})},26:function(e,t){}});
|
easy-watermark.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Author URI: https://bracketspace.com/
|
7 |
* Text Domain: easy-watermark
|
8 |
* Domain Path: /languages
|
9 |
-
* Version: 1.0.
|
10 |
* License: GPLv2 or later
|
11 |
*
|
12 |
* @package easy-watermark
|
6 |
* Author URI: https://bracketspace.com/
|
7 |
* Text Domain: easy-watermark
|
8 |
* Domain Path: /languages
|
9 |
+
* Version: 1.0.3
|
10 |
* License: GPLv2 or later
|
11 |
*
|
12 |
* @package easy-watermark
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: watermark, image, picture, photo, media, gallery, signature, transparent,
|
|
5 |
Requires at least: 3.8
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.2
|
8 |
-
Stable tag: 1.0.
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
Text Domain: easy-watermark
|
@@ -118,6 +118,10 @@ All available placeholders are listed in a box titled 'Placeholders' displayed w
|
|
118 |
|
119 |
== Changelog ==
|
120 |
|
|
|
|
|
|
|
|
|
121 |
= 1.0.2 =
|
122 |
* [Fixed] Media library not working with ACF plugin enabled
|
123 |
|
5 |
Requires at least: 3.8
|
6 |
Requires PHP: 5.6
|
7 |
Tested up to: 5.2
|
8 |
+
Stable tag: 1.0.3
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
Text Domain: easy-watermark
|
118 |
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= 1.0.3 =
|
122 |
+
* [Fixed] FileBird compatibility
|
123 |
+
* [Fixed] Frontend content builders compatibility
|
124 |
+
|
125 |
= 1.0.2 =
|
126 |
* [Fixed] Media library not working with ACF plugin enabled
|
127 |
|
src/classes/Core/Assets.php
CHANGED
@@ -65,12 +65,21 @@ class Assets {
|
|
65 |
'watermark-edit' => [ 'jquery', 'wp-color-picker' ],
|
66 |
];
|
67 |
|
|
|
|
|
|
|
|
|
68 |
foreach ( $assets as $filename => $deps ) {
|
69 |
$script_version = $this->asset_version( 'scripts', $filename . '.js' );
|
70 |
$style_version = $this->asset_version( 'styles', $filename . '.css' );
|
|
|
|
|
|
|
|
|
|
|
71 |
|
72 |
if ( false !== $script_version ) {
|
73 |
-
wp_register_script( 'ew-' . $filename, $this->asset_url( 'scripts', $filename . '.js' ), $deps, $script_version,
|
74 |
}
|
75 |
|
76 |
if ( false !== $style_version ) {
|
65 |
'watermark-edit' => [ 'jquery', 'wp-color-picker' ],
|
66 |
];
|
67 |
|
68 |
+
if ( class_exists( 'FileBird' ) ) {
|
69 |
+
$assets['uploader'][] = 'njt-filebird-upload-libray-scripts';
|
70 |
+
}
|
71 |
+
|
72 |
foreach ( $assets as $filename => $deps ) {
|
73 |
$script_version = $this->asset_version( 'scripts', $filename . '.js' );
|
74 |
$style_version = $this->asset_version( 'styles', $filename . '.css' );
|
75 |
+
$in_footer = true;
|
76 |
+
|
77 |
+
if ( 'uploader' === $filename ) {
|
78 |
+
$in_footer = false;
|
79 |
+
}
|
80 |
|
81 |
if ( false !== $script_version ) {
|
82 |
+
wp_register_script( 'ew-' . $filename, $this->asset_url( 'scripts', $filename . '.js' ), $deps, $script_version, $in_footer );
|
83 |
}
|
84 |
|
85 |
if ( false !== $style_version ) {
|
src/classes/Features/AutoWatermarkSwitch.php
CHANGED
@@ -33,7 +33,7 @@ class AutoWatermarkSwitch {
|
|
33 |
*/
|
34 |
public function pre_plupload_upload_ui() {
|
35 |
|
36 |
-
if ( 'media' !== get_current_screen()->id ) {
|
37 |
// phpcs:ignore
|
38 |
echo new View( 'upload/switch' );
|
39 |
}
|
33 |
*/
|
34 |
public function pre_plupload_upload_ui() {
|
35 |
|
36 |
+
if ( ! is_admin() || 'media' !== get_current_screen()->id ) {
|
37 |
// phpcs:ignore
|
38 |
echo new View( 'upload/switch' );
|
39 |
}
|