wpzoom/customizer-reset
Composer 安装命令:
composer require wpzoom/customizer-reset
包简介
Reset theme customizations (theme_mods) made via WordPress Customizer
README 文档
README
A lightweight WordPress plugin that adds reset, backup, and import/export functionality to the WordPress Customizer.
The Problem
WordPress Customizer is missing some basic features:
- No reset button - Can't easily start fresh with theme defaults
- No backup - Make a change you regret? Too bad
- No export/import - Want to move settings between sites? Good luck
The Solution
This plugin adds all of that in a clean, lightweight package (~40 KB).
Features
Reset Customizer
- One-click reset to theme defaults
- Optional: Also reset Additional CSS
- Works with popular themes (Divi, Astra, GeneratePress, and more)
Backup System
- Automatic backup before reset
- Manual backup creation
- 5 rotating backups stored for 30 days
- One-click restore from any backup
Import & Export
- Export settings to JSON or DAT format
- Drag & drop file import
- Compatible with "Customizer Export/Import" plugin files
- Option to download and import images from remote URLs
Additional CSS Support
- Included in exports and backups
- Optional reset checkbox
- Preserved during restore
Installation
From WordPress.org
- Go to Plugins → Add New in your WordPress admin
- Search for "Customizer Backup & Reset"
- Click Install Now and then Activate
Manual Installation
- Download the plugin from WordPress.org
- Upload to
/wp-content/plugins/customizer-reset-by-wpzoom/ - Activate through the Plugins menu
From GitHub
cd wp-content/plugins
git clone https://github.com/wpzoom/customizer-reset-by-wpzoom.git
Usage
- Go to Appearance → Customize
- Look for the "Customizer Backup & Reset" section at the bottom
- Or click the "Reset Tools" button in the customizer header
Reset Options
- Backup & Reset Customizer - Creates a backup, then resets (recommended)
- Reset Customizer (No Backup) - Resets immediately without backup
- Also remove Additional CSS - Check this to also clear Additional CSS
Export/Import
- Export - Downloads your settings as JSON or DAT file
- Import - Click the button or drag & drop a file
- Download and import image files - Check this to also import images
Backup History
- View all your backups with timestamps
- Restore any backup with one click
- Create Backup without resetting
- Delete individual backups or all at once
Theme Compatibility
Works with 99% of themes. Special handling for:
- Divi - Preserves Theme Options while resetting Customizer settings
- Astra - Preserves theme version settings
- GeneratePress - Clears dynamic CSS cache for immediate frontend updates
Using a theme that doesn't work? Let us know!
Developer Hooks
Filter: customizer_reset_settings
Modify which settings get reset:
add_filter( 'customizer_reset_settings', function( $settings ) { // Remove specific settings from reset unset( $settings['my_setting_id'] ); return $settings; });
Filter: customizer_reset_export_option_keys
Add custom options to export data:
add_filter( 'customizer_reset_export_option_keys', function( $option_keys ) { $option_keys[] = 'my_custom_option'; return $option_keys; });
WordPress Hooks
During import, standard WordPress hooks are triggered:
customize_save- Before all settings are savedcustomize_save_{$setting_id}- For each individual settingcustomize_save_after- After all settings are saved
Requirements
- WordPress 6.4 or higher
- PHP 7.4 or higher
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development
# Install dependencies composer install # Check coding standards composer run phpcs # Auto-fix coding standards composer run phpcbf # Run static analysis composer run phpstan
Changelog
2.0.3
- NEW: Added "Create Backup" button to save backups without resetting
- Fixed multisite compatibility
2.0.2
- Minor bug fix in WP 6.9
2.0.1
- Minor bug fix
2.0.0
- NEW: Redesigned UI with new customizer section panel
- NEW: Import/Export with dual format support (JSON and DAT)
- NEW: Additional CSS reset option
- NEW: Backup system with 5 rotating backups (30 days)
- Added GeneratePress theme compatibility
- Added translation support
Credits
Developed by WPZOOM
License
This plugin is licensed under the GPL v3 or later.
Links: WordPress.org · WPZOOM · Support
wpzoom/customizer-reset 适用场景与选型建议
wpzoom/customizer-reset 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 18, 最近一次更新时间为 2021 年 05 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 wpzoom/customizer-reset 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 wpzoom/customizer-reset 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 18
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2021-05-18