soderlind/additional-javascript
Composer 安装命令:
composer require soderlind/additional-javascript
包简介
Add JavaScript using WordPress Customizer
关键字:
README 文档
README
About
Additional JavaScript for WordPress Customizer lets you add JavaScript code, to the front-end, using the WordPress Customizer - safely and with live preview.
Features
- Add custom JavaScript through the familiar WordPress Customizer interface
- Live preview of JavaScript changes
- Syntax highlighting in the editor
- Error reporting for JavaScript syntax issues
- Revision history for your JavaScript code (uses WordPress post revisions)
- Secure implementation - only users with the 'unfiltered_html' capability can edit JavaScript
- Clean, minimal interface focused on code editing
- Works with any WordPress theme
Security
This plugin restricts JavaScript editing to users with the 'unfiltered_html' capability, which by default is only granted to administrators on single site installations and super administrators on multisite installations.
Installation
-
Quick Install
- Download
additional-javascript.zip - Upload via Plugins > Add New > Upload Plugin
- Activate the plugin.
- Download
-
Composer Install
composer require soderlind/additional-javascript
-
Updates
- Plugin updates are handled automatically via GitHub. No need to manually download and install updates.
Usage
- Navigate to Appearance → Customize in your WordPress admin area
- Click on the "Additional JavaScript" section at the bottom of the customizer menu
- Add your JavaScript code in the editor
- See the live preview of your changes
- Click "Publish" to apply your JavaScript to the site
Requirements
- WordPress 6.3 or higher
- PHP 8.2 or higher
- User with
unfiltered_htmlcapability
Frequently Asked Questions
Who can add JavaScript using this plugin?
Only users with the 'unfiltered_html' capability can add JavaScript using this plugin. By default, this is limited to administrators on single site installations and super administrators on multisite installations.
Will this slow down my site?
No, the plugin is designed to be lightweight and only loads the necessary scripts and styles when needed.
Where is the JavaScript added on my site?
The JavaScript is added at the end of the <head> section of your site with a priority of 110.
Changelog
1.1.4
- Enhanced class loading for the GitHub plugin updater.
1.1.3
- Use generic WordPress Plugin GitHub Updater
1.1.2
- Minor code improvements
1.1.1
- Add plugin updater
1.1.0
- Updated compatibility with WordPress 6.5
- Code improvements and optimization
- Enhanced security measures
1.0.0
- Initial release
Copyright and License
Additional JavaScript is copyright 2018-2025 Per Soderlind
Additional JavaScript is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
Additional JavaScript is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Extension. If not, see http://www.gnu.org/licenses/.
soderlind/additional-javascript 适用场景与选型建议
soderlind/additional-javascript 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.06k 次下载、GitHub Stars 达 4, 最近一次更新时间为 2019 年 12 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「wordpress」 「control」 「wp」 「customizer」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 soderlind/additional-javascript 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 soderlind/additional-javascript 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 soderlind/additional-javascript 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Easy custom fonts upload and CSS injection with Kirki WordPress plugin.
Provide a way to secure accesses to all routes of an symfony application.
Easy custom WordPress customizer settings for WordPress MVC (WPMVC) framework.
Adds several Theme Customizer controls
A Range Slider Control for the WordPress Customizer.
A Toggle Control for the WordPress Customizer.
统计信息
- 总下载量: 1.06k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2019-12-03
