{"id":34676734,"url":"https://github.com/golchha21/wp-plugin-boilerplate","last_synced_at":"2026-03-01T18:04:07.268Z","repository":{"id":336420862,"uuid":"1148733112","full_name":"golchha21/wp-plugin-boilerplate","owner":"golchha21","description":"An opinionated WordPress plugin boilerplate for building long-lived plugins with explicit structure and predictable lifecycle behavior.","archived":false,"fork":false,"pushed_at":"2026-02-15T17:27:07.000Z","size":157,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-16T00:40:36.676Z","etag":null,"topics":["boilerplate","wordpress","wordpress-development","wordpress-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golchha21.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-03T09:55:25.000Z","updated_at":"2026-02-15T17:28:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/golchha21/wp-plugin-boilerplate","commit_stats":null,"previous_names":["golchha21/wp-plugin-boilerplate"],"tags_count":13,"template":true,"template_full_name":null,"purl":"pkg:github/golchha21/wp-plugin-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golchha21%2Fwp-plugin-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golchha21%2Fwp-plugin-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golchha21%2Fwp-plugin-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golchha21%2Fwp-plugin-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golchha21","download_url":"https://codeload.github.com/golchha21/wp-plugin-boilerplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golchha21%2Fwp-plugin-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29977970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","wordpress","wordpress-development","wordpress-plugin"],"created_at":"2025-12-24T20:56:32.671Z","updated_at":"2026-03-01T18:04:07.251Z","avatar_url":"https://github.com/golchha21.png","language":"PHP","funding_links":["https://www.buymeacoffee.com/golchha21"],"categories":[],"sub_categories":[],"readme":"# WP Plugin Boilerplate\r\n\r\n![PHP](https://img.shields.io/badge/PHP-%3E%3D7.4-777BB4?logo=php\u0026logoColor=white)\r\n![Version](https://img.shields.io/github/v/tag/golchha21/wp-plugin-boilerplate)\r\n![Downloads](https://img.shields.io/github/downloads/golchha21/wp-plugin-boilerplate/total)\r\n\r\nAn opinionated WordPress plugin boilerplate for building long-lived\r\nplugins with explicit structure and predictable lifecycle behavior.\r\n\r\nThis project does not provide user-facing features and does not try to\r\nreplace WordPress conventions, Git workflows, or existing development\r\npractices.\r\n\r\nIt exists to provide a constrained starting point for plugins that are\r\nexpected to grow over time --- where admin configuration, settings,\r\nfrontend behavior, and lifecycle concerns tend to blur and accumulate\r\naccidental complexity.\r\n\r\n------------------------------------------------------------------------\r\n\r\n## Core Principles\r\n\r\n-   Clear separation between admin, settings, and public runtime\r\n-   Settings treated as a domain boundary\r\n-   Predictable lifecycle behavior\r\n-   Minimal magic and no hidden side effects\r\n-   Constraints designed for long-term maintainability\r\n\r\n------------------------------------------------------------------------\r\n\r\n## Settings System (v1.1+)\r\n\r\nThe settings layer is now a structured, extensible system.\r\n\r\n### Field Architecture\r\n\r\n-   Schema-driven `FieldDefinition`\r\n-   Centralized `FieldRenderer`\r\n-   Deterministic sanitization per field\r\n-   Nested option handling\r\n-   Extensible field pattern\r\n\r\n### Supported Fields\r\n\r\n-   text\r\n-   textarea\r\n-   email\r\n-   url\r\n-   password\r\n-   hidden\r\n-   date\r\n-   time\r\n-   datetime-local\r\n-   number\r\n-   checkbox\r\n-   radio\r\n-   select\r\n-   color\r\n-   editor (wp_editor powered)\r\n-   media (single \u0026 multiple)\r\n-   repeater (nested structured fields)\r\n\r\n------------------------------------------------------------------------\r\n\r\n## Repeater Field\r\n\r\nThe repeater allows structured, sortable nested data.\r\n\r\nFeatures:\r\n\r\n-   Collapsible rows (collapsed by default)\r\n-   Drag \u0026 drop sorting\r\n-   Duplicate row support\r\n-   Min / max limits\r\n-   Independent row sanitization\r\n-   Template-based rendering\r\n-   Dashicon controls\r\n\r\nRepeaters always store ordered arrays and never leak template markup\r\ninto runtime DOM.\r\n\r\n------------------------------------------------------------------------\r\n\r\n## Media Field\r\n\r\nStores attachment IDs only.\r\n\r\nSupports:\r\n\r\n-   Single selection (integer)\r\n-   Multiple selection (ordered array)\r\n-   Drag sorting (multiple mode)\r\n-   Per-item removal (multiple mode)\r\n-   MIME restriction support\r\n-   Square preview layout\r\n\r\nBehavior adapts automatically based on `multiple: true`.\r\n\r\n------------------------------------------------------------------------\r\n\r\n## Admin UI System\r\n\r\nThe admin interface is:\r\n\r\n-   Fully scoped under `.wppb-admin`\r\n-   Built on a 12-column CSS Grid layout\r\n-   Powered by semantic design tokens\r\n-   Safe from wp-admin style conflicts\r\n\r\nExample:\r\n\r\n``` php\r\n'class' =\u003e 'width-6',\r\n```\r\n\r\nAvailable widths:\r\n\r\n-   width-1 → width-12\r\n-   Default: width (full width)\r\n\r\n------------------------------------------------------------------------\r\n\r\n## Folder Responsibilities\r\n\r\nDirectory       Responsibility\r\n  --------------- -----------------------------\r\nsrc/Admin       Admin UI \u0026 menus\r\nsrc/Settings    Settings tabs \u0026 persistence\r\nsrc/Public      Frontend/runtime behavior\r\nsrc/Lifecycle   Activation \u0026 deactivation\r\nsrc/Support     Shared infrastructure\r\nassets          CSS, JS, static assets\r\nvendor          Bundled dependencies\r\n\r\nEach directory represents a deliberate boundary.\r\n\r\n------------------------------------------------------------------------\r\n\r\n## Stability Guarantees\r\n\r\nStarting with v1.0:\r\n\r\n-   Public behavior is registered unconditionally\r\n-   Admin configuration flows cleanly into runtime\r\n-   Lifecycle behavior is predictable\r\n-   Uninstall cleans up plugin-owned data\r\n-   Plugin renaming does not break behavior\r\n-   Distributed as a self-contained package\r\n\r\nBreaking these guarantees requires a major version bump.\r\n\r\n------------------------------------------------------------------------\r\n\r\n## Versioning\r\n\r\nSemantic Versioning is followed:\r\n\r\n-   Patch → internal fixes\r\n-   Minor → new field types or UI features\r\n-   Major → structural or storage changes\r\n\r\n------------------------------------------------------------------------\r\n\r\n## Changelog\r\n\r\nPlease see [CHANGELOG](CHANGELOG.md) for more information on recent changes.\r\n\r\n## Security\r\n\r\nIf you discover any security-related issues, please email **vardhans@ulhas.net** instead of using the issue tracker.\r\n\r\n## Credits\r\n\r\n- [Ulhas Vardhan Golchha](https://github.com/golchha21) — *Initial work*\r\n\r\nSee also the list of [contributors](https://github.com/golchha21/wp-plugin-boilerplate/graphs/contributors).\r\n\r\n------------------------------------------------------------------------\r\n\r\n## License\r\n\r\nThis project is licensed under the **GNU General Public License v2.0 or later (GPL-2.0-or-later)**.\r\n\r\nWordPress is licensed under the GPL, and any plugin that runs within WordPress\r\nand uses its APIs is required to be GPL-compatible.\r\n\r\nYou are free to use, modify, and distribute this software under the terms\r\nof the GPL. See the [LICENSE](LICENSE) file for details.\r\n\r\n------------------------------------------------------------------------\r\n\r\nIf this boilerplate has been useful to you, you can support its development here:  \r\n[Buy me a coffee](https://www.buymeacoffee.com/golchha21)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolchha21%2Fwp-plugin-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolchha21%2Fwp-plugin-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolchha21%2Fwp-plugin-boilerplate/lists"}