Install
Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/bonsai-systems/bonsai-page-loader/releases/download/v1.2.0/bonsai-page-loader.zipA minimal WordPress plugin that displays a full-screen loading overlay (configurable background colour and logo) while a page loads, then fades it out.
Features
- Settings page under Settings → Page Loader
- Enable/disable toggle
- Configurable background colour (WP colour picker)
- Optional logo (Media Library), falls back to the site name if none is set
- Configurable fade and removal timings (ms)
- Loader markup printed via
wp_body_open - Options removed on uninstall
Requirements
- WordPress 6.0+
- PHP 8.0+
- Theme must call
wp_body_open()inheader.phpfor the loader to output. Bonsai base themes do this by default.
Usage
- Activate the plugin.
- Go to Settings → Page Loader.
- Enable the loader, set a background colour, optionally choose a logo, and adjust fade/removal timings.
Data Structure
A single option is stored:
bdc_pl_options(array):enabled,background_color,logo_id,fade_ms,remove_ms
Deleted when the plugin is uninstalled.
Updates
Ships with YahnisElsts/plugin-update-checker (installed via Composer, vendor/ committed) pointed at github.com/Bonsai-Systems/bonsai-page-loader. Sites with the plugin installed will see updates in Plugins in wp-admin, same as bonsai-code-injector and bonsai-maintenance.
To ship a new version:
- Bump the
Version:header and theBPL_VERSIONconstant inbonsai-page-loader.php, and add aCHANGELOG.mdentry. - Commit and push to
main. - Publish a GitHub Release tagged with the new version (release-assets mode is enabled, so attach a zip of the plugin folder — plain source-archive tags won't be picked up).
Sites check for updates every 6 hours ($checkPeriod argument to buildUpdateChecker()), or immediately if an admin clicks "Check again" on the Plugins screen.
Releases
2 releases. Each count is every asset in that release; expand a row for the breakdown.