定制 lwplugins/lw-enable 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

lwplugins/lw-enable

最新稳定版本:v1.0.11

Composer 安装命令:

composer require lwplugins/lw-enable

包简介

Enable WordPress features: SVG uploads and more.

README 文档

README

Enable WordPress features: SVG uploads and more.

Packagist PHP WordPress License

LW Enable Settings

Features

Media

  • SVG Uploads - Allow SVG file uploads with comprehensive security sanitization
    • MIME type registration
    • Script/XSS detection and blocking
    • XXE (XML External Entity) protection
    • Event handler detection
    • Obfuscation detection (Unicode/hex escapes, entity encoding)
    • Automatic SVG dimension extraction (width/height and viewBox)
    • 5MB file size limit
    • Post-upload re-validation

Installation

composer require lwplugins/lw-enable

Or download and upload to /wp-content/plugins/.

Usage

Admin UI

  1. Go to LW Plugins → Enable
  2. Check the features you want to enable
  3. Save

WP-CLI

# List all features and their status
wp lw-enable list

# Enable a feature
wp lw-enable enable svg

# Disable a feature
wp lw-enable disable svg

# Enable all features at once
wp lw-enable enable-all

# Disable all features (restore defaults)
wp lw-enable disable-all

Available features:

Feature Description
svg SVG file uploads with security sanitization

Security

SVG files can contain malicious code. This plugin performs comprehensive sanitization before allowing uploads:

  • 34 dangerous patterns detected (scripts, event handlers, external entities, data URIs, etc.)
  • Entity decoding to catch obfuscated payloads
  • XML validation via DOMDocument
  • Post-upload verification - files are re-checked after WordPress processes them
  • Automatic cleanup - invalid files are deleted immediately

Links

Sponsor

Sinann

Supported by Sinann

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-02-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固