soderlind/additional-javascript 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  • Composer Install

    composer require soderlind/additional-javascript
  • Updates

Usage

  1. Navigate to Appearance → Customize in your WordPress admin area
  2. Click on the "Additional JavaScript" section at the bottom of the customizer menu
  3. Add your JavaScript code in the editor
  4. See the live preview of your changes
  5. Click "Publish" to apply your JavaScript to the site

Requirements

  • WordPress 6.3 or higher
  • PHP 8.2 or higher
  • User with unfiltered_html capability

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

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 soderlind/additional-javascript 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.06k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2019-12-03