gebruederheitz / wp-theme-mod-export
Export & Import theme_mods / customizer settings.
v1.0.4
2022-02-08 18:28 UTC
Requires
- php: >=7.3
- ext-json: *
- gebruederheitz/wp-simple-rest: ^2.0
Requires (Dev)
- phpstan/phpstan: ^1.4
- szepeviktor/phpstan-wordpress: ^1.0
README
Export & Import theme_mods / customizer settings.
Installation
via composer:
> composer require gebruederheitz/wp-theme-mod-export
Make sure you have Composer autoload or an alternative class loader present.
Usage
# functions.php (or controller class) use Gebruederheitz\Wordpress\ThemeModExporter; ThemeModExporter::init();
This will set up the utility page allowing users to export theme_mods (which
Customizer settings are usually stored under, e.g. in gebruederheitz/wp-easy-customizer
)
to a JSON file, and to import one of those files into the currently selected
theme.
The page will appear in the "Design" section of the Wordpress backend at
/wordpress/wp-admin/themes.php?page=ghwp-theme-mods-export
.
Development
Dependencies
- PHP >= 7.4
- Composer 2.x
- NVM and nodeJS LTS (v16.x)
- Nice to have: GNU Make (or drop-in alternative)