-
Notifications
You must be signed in to change notification settings - Fork 0
Developing
- WordPress 6.0+ with WP Desktop Mode v0.5.0+ active.
- PHP 7.4+.
- Python 3 on
PATH(used only by the validators and by_tools/content scripts). -
gitwith hooks enabled — rungit config core.hooksPath .githooksonce after cloning.
No Node or npm step. All JavaScript in the plugin is plain ES5-compatible and loaded via wp_enqueue_script.
-
Clone this repo into
wp-content/plugins/odd/(or symlink it). -
Activate ODD alongside WP Desktop Mode.
-
Edit files and refresh — there is no build step.
-
For a full validation pass before pushing:
odd/bin/check-version \ && odd/bin/validate-scenes \ && odd/bin/validate-icon-sets \ && odd/bin/build-zip
-
odd/bin/validate-scenes— every scene insrc/wallpaper/scenes.jsonhas a JS module, a preview WebP, and a wallpaper WebP on disk. Fails CI on drift. -
odd/bin/validate-icon-sets— everyassets/icons/<slug>/manifest.jsonparses, declaresslug / label / franchise / accent / icons, and every icon referenced on disk parses as well-formed XML with aviewBox(orwidth+height). Explicitly scans for control bytes< 0x20outside\t\n\rin SVG bodies — see Gotchas. -
odd/bin/check-version— theVersion:header inodd/odd.phpmatches theODD_VERSIONconstant. Also mirrored by the pre-commit hook.
.github/workflows/ci.yml runs on every PR and push to main:
-
validate-scenes— manifest + assets for every scene. -
validate-icon-sets— manifest + SVGs for every set. -
check-version— header + constant inodd.phpagree. -
json-valid—blueprint.json,scenes.json,drifters.json, every icon manifest parses. -
zip-budget—odd/bin/build-zipwith a 35 MB cap; uploadsodd.zipas a workflow artifact.
.githooks/pre-commit runs odd/bin/check-version only when odd/odd.php is in the commit — catches the "bumped Version: header but forgot ODD_VERSION" class of mistake locally instead of burning a tag cycle.
Install once after cloning:
git config core.hooksPath .githooksSkip in an emergency with git commit --no-verify.
The blueprint at blueprint.json installs ODD's latest release ZIP + WP Desktop Mode into a fresh WordPress, logs you in, and pre-selects the ODD wallpaper.
To test an unreleased branch:
- Push the branch.
- Temporarily edit
blueprint.jsonlocally to pointurlathttps://raw.githubusercontent.com/RegionallyFamous/odd/<branch>/odd/odd.phpstyle — or serve a ZIP viaodd/bin/build-zipand upload it somewhere CORS-friendly. - Open
https://playground.wordpress.net/?blueprint-url=<your-blueprint-url>.
raw.githubusercontent.com and github.com/*/releases/download/... both serve with access-control-allow-origin: *. Other hosts usually don't — verify with curl -H "Origin: https://playground.wordpress.net" -I <url> before pointing a blueprint at a new URL.
How the plugin's built: the Pixi engine, the icon pipeline, and the sharp edges between them.