Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/wp-api/live-settings/archive/refs/heads/master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Live Settings for WordPress
Update your settings, live, and avoid unnecessary page refreshes.
Installation
- Clone this repository, or download as a zip.
- Install as a plugin and activate.
- That's it!
Using in Plugins
Live Settings automatically attaches to all pages under the Settings menu in the admin. This should work automatically on plugin settings pages as well, however you will need to register your settings:
add_action( 'rest_api_init', __NAMESPACE__ . '\\register_settings' );
function register_settings() {
register_setting( 'optiongroup', 'my_custom_setting', array(
'type' => 'boolean',
'show_in_rest' => true,
));
}
Live Settings will attach to your page and automatically discover the settings input fields that match.