diff --git a/composer.json b/composer.json index da6eb6b..8f98e8b 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "require-dev": { "slowprog/composer-copy-file": "~0.3", "woocommerce/action-scheduler": "^3.5", - "wpackio/enqueue": "^3.4" + "wpackio/enqueue": "^3.5" }, "config": { "allow-plugins": { diff --git a/composer.lock b/composer.lock index a509a71..4df5ce0 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "01efd37a4e2b1db4e582f9c4640c991e", + "content-hash": "1188c368c73c213fbfba040b2f13b14c", "packages": [ { "name": "composer/installers", @@ -247,16 +247,16 @@ }, { "name": "wpackio/enqueue", - "version": "3.4.0", + "version": "3.5.0", "source": { "type": "git", "url": "https://github.com/swashata/wpackio-enqueue.git", - "reference": "8a5604f5ab3bd5f000e503dda02603e15e534d47" + "reference": "944dd17df10e2e534e62ca3f5f20e550c2058a63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swashata/wpackio-enqueue/zipball/8a5604f5ab3bd5f000e503dda02603e15e534d47", - "reference": "8a5604f5ab3bd5f000e503dda02603e15e534d47", + "url": "https://api.github.com/repos/swashata/wpackio-enqueue/zipball/944dd17df10e2e534e62ca3f5f20e550c2058a63", + "reference": "944dd17df10e2e534e62ca3f5f20e550c2058a63", "shasum": "" }, "require": { @@ -291,9 +291,9 @@ "description": "API to enqueue assets generated by @wpackio/scripts into your WordPress plugin or theme.", "support": { "issues": "https://github.com/swashata/wpackio-enqueue/issues", - "source": "https://github.com/swashata/wpackio-enqueue/tree/3.4.0" + "source": "https://github.com/swashata/wpackio-enqueue/tree/3.5.0" }, - "time": "2021-07-31T02:55:39+00:00" + "time": "2023-01-14T07:33:57+00:00" } ], "aliases": [], diff --git a/dist/focalpoint/admin-0d547173.js b/dist/focalpoint/admin-0d547173.js index e88bc37..5607f2b 100644 --- a/dist/focalpoint/admin-0d547173.js +++ b/dist/focalpoint/admin-0d547173.js @@ -3,7 +3,7 @@ * ResponsivePics * * @author Clarify - * @version 1.7.1 + * @version 1.7.8 * @link https://responsive.pics * @license UNLICENSED * diff --git a/dist/focalpoint/admin-7cb5b1a5.css b/dist/focalpoint/admin-7cb5b1a5.css index 0fdd2a8..c705f71 100644 --- a/dist/focalpoint/admin-7cb5b1a5.css +++ b/dist/focalpoint/admin-7cb5b1a5.css @@ -3,7 +3,7 @@ * ResponsivePics * * @author Clarify - * @version 1.7.1 + * @version 1.7.8 * @link https://responsive.pics * @license UNLICENSED * diff --git a/dist/focalpoint/runtime-0d98a8a8.js b/dist/focalpoint/runtime-0d98a8a8.js index e3178df..ab4a55d 100644 --- a/dist/focalpoint/runtime-0d98a8a8.js +++ b/dist/focalpoint/runtime-0d98a8a8.js @@ -3,7 +3,7 @@ * ResponsivePics * * @author Clarify - * @version 1.7.1 + * @version 1.7.8 * @link https://responsive.pics * @license UNLICENSED * diff --git a/lib/wpackio/enqueue/inc/Enqueue.php b/lib/wpackio/enqueue/inc/Enqueue.php index d801278..104537e 100644 --- a/lib/wpackio/enqueue/inc/Enqueue.php +++ b/lib/wpackio/enqueue/inc/Enqueue.php @@ -143,9 +143,13 @@ private function sanitize_path( $path ) { * and dynamic imports possible. */ public function printPublicPath() { - $publicPath = $this->getUrl( '' ); + $publicPath = apply_filters( 'wpackio_print_public_path', $this->getUrl( '' ), $this->appName, $this->outputPath ); $jsCode = 'window.__wpackIo' . $this->sanitize_path( $this->appName . $this->outputPath ) . '=\'' . esc_js( $publicPath ) . '\';'; - echo ''; + + // Enqueue an empty script so we can add an inline script that allows for filtering via `wp_inline_script_attributes` + \wp_register_script("{$this->appName}/publicPath", '', [], false, true); + \wp_enqueue_script("{$this->appName}/publicPath"); + \wp_add_inline_script("{$this->appName}/publicPath", "/* wpack.io publicPath */ {$jsCode}"); } /** diff --git a/package-lock.json b/package-lock.json index 5ab02a1..c6e3e33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,20 @@ { "name": "responsive-pics", - "version": "1.7.7", + "version": "1.7.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "responsive-pics", - "version": "1.7.3", + "version": "1.7.8", "dependencies": { "@wpackio/entrypoint": "^6.4.0" }, "devDependencies": { "@wpackio/scripts": "^6.4.0", "cssnano": "^5.1.14", - "postcss": "^8.4.31", - "sass": "^1.56.1" + "postcss": "^8.4.32", + "sass": "^1.69.5" } }, "node_modules/@ampproject/remapping": { @@ -9215,9 +9215,9 @@ "optional": true }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, "funding": [ { @@ -10204,9 +10204,9 @@ } }, "node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "version": "8.4.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", + "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", "dev": true, "funding": [ { @@ -10223,7 +10223,7 @@ } ], "dependencies": { - "nanoid": "^3.3.6", + "nanoid": "^3.3.7", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -11484,9 +11484,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz", - "integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==", + "version": "1.69.5", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz", + "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -11497,7 +11497,7 @@ "sass": "sass.js" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } }, "node_modules/sass-loader": { @@ -21737,9 +21737,9 @@ "optional": true }, "nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true }, "nanomatch": { @@ -22513,12 +22513,12 @@ "dev": true }, "postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "version": "8.4.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", + "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", "dev": true, "requires": { - "nanoid": "^3.3.6", + "nanoid": "^3.3.7", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } @@ -23445,9 +23445,9 @@ "dev": true }, "sass": { - "version": "1.56.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.56.1.tgz", - "integrity": "sha512-VpEyKpyBPCxE7qGDtOcdJ6fFbcpOM+Emu7uZLxVrkX8KVU/Dp5UF7WLvzqRuUhB6mqqQt1xffLoG+AndxTZrCQ==", + "version": "1.69.5", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.69.5.tgz", + "integrity": "sha512-qg2+UCJibLr2LCVOt3OlPhr/dqVHWOa9XtZf2OjbLs/T4VPSJ00udtgJxH3neXZm+QqX8B+3cU7RaLqp1iVfcQ==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", diff --git a/package.json b/package.json index 4c465ca..0d28eee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "responsive-pics", - "version": "1.7.7", + "version": "1.7.8", "private": true, "scripts": { "bootstrap": "wpackio-scripts bootstrap", @@ -11,8 +11,8 @@ "devDependencies": { "@wpackio/scripts": "^6.4.0", "cssnano": "^5.1.14", - "postcss": "^8.4.31", - "sass": "^1.56.1" + "postcss": "^8.4.32", + "sass": "^1.69.5" }, "dependencies": { "@wpackio/entrypoint": "^6.4.0" diff --git a/responsive-pics.php b/responsive-pics.php index 3dfd8fd..eeb3dcb 100644 --- a/responsive-pics.php +++ b/responsive-pics.php @@ -4,7 +4,7 @@ Plugin URI: https://responsive.pics Description: Responsive Pics is a Wordpress tool for resizing images on the fly. Author: Clarify (previously Booreiland) - Version: 1.7.7 + Version: 1.7.8 Author URI: https://clarify.nl Copyright: Wimer Hazenberg, Toine Kamps */ @@ -38,7 +38,7 @@ function __construct() { // Variables define('RESPONSIVE_PICS_DIR', plugin_dir_path(__FILE__)); - define('RESPONSIVE_PICS_VERSION', '1.7.7'); + define('RESPONSIVE_PICS_VERSION', '1.7.8'); define('RESPONSIVE_PICS_TEXTDOMAIN', 'responsive-pics'); // Init