From 7d40c7e7366b33dd353b84c149742dea3a719c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20S=C3=B8derlind?= Date: Mon, 11 Aug 2025 11:12:02 +0200 Subject: [PATCH] Bump version to 1.1.6 and update changelog - Updated version number in additional-javascript.php, package.json, and package-lock.json to 1.1.6. - Modified readme.txt to reflect the new stable tag of 1.1.6. - Added changelog entries for version 1.1.6: - Inline the custom JavaScript using `wp_print_inline_script_tag()`. - Ensure the script is printed in the footer. --- CHANGELOG.md | 6 ++++++ additional-javascript.php | 10 +++------- package-lock.json | 4 ++-- package.json | 2 +- readme.txt | 6 +++++- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3a7b41..155b74b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [1.1.6] - 2025-08-11 + +### Fixed +- Inline the custom javascript using ` ()` +- Ensure the script is printed in the footer + ## [1.1.5] - 2025-07-16 ### Fixed diff --git a/additional-javascript.php b/additional-javascript.php index 74449d9..e01e9e2 100644 --- a/additional-javascript.php +++ b/additional-javascript.php @@ -12,7 +12,7 @@ * Plugin URI: https://github.com/soderlind/additional-javascript * GitHub Plugin URI: https://github.com/soderlind/additional-javascript * Description: Add additional JavaScript using the WordPress Customizer. - * Version: 1.1.5 + * Version: 1.1.6 * Author: Per Soderlind * Author URI: https://soderlind.no * Text Domain: additional-javascript @@ -44,7 +44,7 @@ ); add_action( 'init', __NAMESPACE__ . '\register_post_type_javascript', 0 ); -add_action( 'wp_head', __NAMESPACE__ . '\soderlind_custom_javascript_cb', 110 ); +add_action( 'wp_footer', __NAMESPACE__ . '\soderlind_custom_javascript_cb', 110 ); add_action( 'customize_register', __NAMESPACE__ . '\register_additional_javascript' ); add_action( 'customize_preview_init', __NAMESPACE__ . '\customize_preview_additional_javascript' ); add_action( 'customize_controls_enqueue_scripts', __NAMESPACE__ . '\on_customize_controls_enqueue_scripts' ); @@ -120,11 +120,7 @@ function register_post_type_javascript() { function soderlind_custom_javascript_cb() { $javascript = soderlind_get_custom_javascript(); if ( $javascript || is_customize_preview() ) { - ?> - - 'soderlind-custom-javascript' ] ); } } diff --git a/package-lock.json b/package-lock.json index 84c6d06..085d9d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "additional-javascript", - "version": "1.1.4", + "version": "1.1.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "additional-javascript", - "version": "1.1.4", + "version": "1.1.6", "license": "GPLv2", "devDependencies": { "@soderlind/wp-project-version-sync": "^2.0.2" diff --git a/package.json b/package.json index d9d17cd..ab62c84 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "additional-javascript", - "version": "1.1.5", + "version": "1.1.6", "description": "Add additional JavaScript using the WordPress Customizer.", "keywords": [ "wordpress", diff --git a/readme.txt b/readme.txt index 9a27022..3240c58 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: javascript, customizer, code, custom code, js Donate link: https://paypal.me/PerSoderlind Requires at least: 6.5 Tested up to: 6.8 -Stable tag: 1.1.5 +Stable tag: 1.1.6 Requires PHP: 8.2 License: GPL-2.0+ License URI: http://www.gnu.org/licenses/gpl-2.0.txt @@ -62,6 +62,10 @@ The JavaScript is added at the end of the `` section of your site with a p == Changelog == += 1.1.6 = +* Inline the custom javascript using `wp_print_inline_script_tag()` +* Ensure the script is printed in the footer + = 1.1.5 = * Fixed deprecated PHP string interpolation syntax for PHP 8.2+ compatibility