gebruederheitz/wp-theme-mod-export

Export & Import theme_mods / customizer settings.

v1.0.4 2022-02-08 18:28 UTC

This package is auto-updated.

Last update: 2024-11-09 00:07:51 UTC


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)