{"id":19107818,"url":"https://github.com/alleyinteractive/create-wordpress-plugin","last_synced_at":"2025-04-14T23:32:25.425Z","repository":{"id":39614497,"uuid":"465010473","full_name":"alleyinteractive/create-wordpress-plugin","owner":"alleyinteractive","description":"A skeleton repository for Alley's WordPress Plugins","archived":false,"fork":false,"pushed_at":"2025-03-11T17:41:30.000Z","size":10841,"stargazers_count":32,"open_issues_count":13,"forks_count":3,"subscribers_count":26,"default_branch":"develop","last_synced_at":"2025-03-12T21:48:17.755Z","etag":null,"topics":["wordpress","wordpress-plugin","wordpress-plugin-template"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alleyinteractive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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}},"created_at":"2022-03-01T18:27:16.000Z","updated_at":"2025-03-11T17:41:21.000Z","dependencies_parsed_at":"2023-10-04T17:54:34.604Z","dependency_job_id":"c9e19486-ae72-4122-aa45-5b5e5f4e993f","html_url":"https://github.com/alleyinteractive/create-wordpress-plugin","commit_stats":{"total_commits":312,"total_committers":6,"mean_commits":52.0,"dds":0.5096153846153846,"last_synced_commit":"da4728072a2916f4625ec0d171ecf5217cf7cd29"},"previous_names":[],"tags_count":16,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alleyinteractive%2Fcreate-wordpress-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alleyinteractive%2Fcreate-wordpress-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alleyinteractive%2Fcreate-wordpress-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alleyinteractive%2Fcreate-wordpress-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alleyinteractive","download_url":"https://codeload.github.com/alleyinteractive/create-wordpress-plugin/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248978586,"owners_count":21192817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["wordpress","wordpress-plugin","wordpress-plugin-template"],"created_at":"2024-11-09T04:14:04.069Z","updated_at":"2025-04-14T23:32:25.416Z","avatar_url":"https://github.com/alleyinteractive.png","language":"PHP","readme":"\u003c!--delete--\u003e\n# Create WordPress Plugin\n\nThis is a skeleton WordPress plugin that can scaffold a WordPress plugin. This\ntemplate includes a base plugin file, autoloaded PHP files, unit tests powered\nby [Mantle](https://mantle.alley.com/), front-end assets compiled via Webpack,\nand Continuous Integration [via GitHub Actions](.github/workflows). Actions are\nconfigured to test the plugin and also build it for releases. A built tag\nworkflow will create `*-built` branches as well as a built release workflow that\nwill build and tag/release the plugin automatically. The built branches and\nreleases will include any compiled front-end assets (if using them).\n\nThe plugin supports front-end assets which can be enqueued inside\n`src/assets.php` or from within an entry points `index.php` file. For plugins\nthat don't require front-end assets, the configuration script below will prompt\nyou to delete the front-end files if you don't wish to use them.\n\n## Getting Started\n\nFollow these steps to get started:\n\n1. Press the \"Use template\" button at the top of this repo to create a new repo\n   with the contents of this skeleton.\n2. Run `make` (or `php ./configure.php`) to run a script that will replace all\n   placeholders throughout all the files.\n3. Have fun creating your plugin! 🎊\n\n\u003c!--/delete--\u003e\n\n# Create WordPress Plugin\n\nContributors: author_username\n\nTags: vendor_name, create-wordpress-plugin\n\nStable tag: 0.0.0\n\nRequires at least: 6.3\n\nTested up to: 6.7\n\nRequires PHP: 8.2\n\nLicense: GPL v2 or later\n\n[![Testing Suite](https://github.com/alleyinteractive/create-wordpress-plugin/actions/workflows/all-pr-tests.yml/badge.svg)](https://github.com/alleyinteractive/create-wordpress-plugin/actions/workflows/all-pr-tests.yml)\n\nA skeleton WordPress plugin.\n\n## Installation\n\nYou can install the package via Composer:\n\n```bash\ncomposer require alleyinteractive/create-wordpress-plugin\n```\n\n## Usage\n\nActivate the plugin in WordPress and use it like so:\n\n```php\n$plugin = Create_WordPress_Plugin\\Skeleton\\Example_Plugin();\n$plugin-\u003eperform_magic();\n```\n\u003c!--front-end--\u003e\n## Testing\n\nRun `npm run test` to run Jest tests against JavaScript files. Run\n`npm run test:watch` to keep the test runner open and watching for changes.\n\nRun `npm run lint` to run ESLint against all JavaScript files. Linting will also\nhappen when running development or production builds.\n\nRun `composer test` to run tests against PHPUnit and the PHP code in the plugin.\nUnit testing code is written in PSR-4 format and can be found in the `tests`\ndirectory.\n\n### The `entries` directory and entry points\n\nAll directories created in the `entries` directory can serve as entry points and will be compiled with [@wordpress/scripts](https://github.com/WordPress/gutenberg/blob/trunk/packages/scripts/README.md#scripts) into the `build` directory with an accompanied `index.asset.php` asset map.\n\n#### Scaffolding an entry point\n\nTo generate a new entry point, run the following command:\n\n```sh\nnpm run create-entry\n```\n\nTo generate a new slotfill, run the following command:\n\n```sh\nnpm run create-slotfill\n```\n\nThe command will prompt the user through several options for creating an entry or slotfill. The entries are scaffolded with the `@alleyinteractive/create-entry` script. Run the help command to see all the options:\n\n```sh\nnpx @alleyinteractive/create-entry --help\n```\n[Visit the package README](https://www.npmjs.com/package/@alleyinteractive/create-entry) for more information.\n\n#### Enqueuing Entry Points\n\nYou can also include an `index.php` file in the entry point directory for enqueueing or registering a script. This file will then be moved to the build directory and will be auto-loaded with the `load_scripts()` function in the `functions.php` file. Alternatively, if a script is to be enqueued elsewhere there are helper functions in the `src/assets.php` file for getting the assets.\n\n### Scaffold a dynamic block with `create-block`\n\nUse the `create-block` command to create custom blocks with [@alleyinteractive/create-block](https://github.com/alleyinteractive/alley-scripts/tree/main/packages/create-block) script and follow the prompts to generate all the block assets in the `blocks/` directory.\nBlock registration, script creation, etc will be scaffolded from the `create-block` script. Run `npm run build` to compile and build the custom block. Blocks are enqueued using the `load_scripts()` function in `src/assets.php`.\n\n### Updating WP Dependencies\n\nUpdate the [WordPress dependency packages](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/#packages-update) used in the project to their latest version.\n\nTo update `@wordpress` dependencies to their latest version use the packages-update command:\n\n```sh\nnpx wp-scripts packages-update\n```\n\nThis script provides the following custom options:\n\n-   `--dist-tag` – allows specifying a custom dist-tag when updating npm packages. Defaults to `latest`. This is especially useful when using [`@wordpress/dependency-extraction-webpack-plugin`](https://www.npmjs.com/package/@wordpress/dependency-extraction-webpack-plugin). It lets installing the npm dependencies at versions used by the given WordPress major version for local testing, etc. Example:\n\n```sh\nnpx wp-scripts packages-update --dist-tag=wp-WPVERSION`\n```\n\nWhere `WPVERSION` is the version of WordPress you are targeting. The version\nmust include both the major and minor version (e.g., `6.7`). For example:\n\n```sh\nnpx wp-scripts packages-update --dist-tag=wp-6.7`\n```\n\u003c!--/front-end--\u003e\n\n## Releasing the Plugin\n\nThe plugin uses\n[action-release](https://github.com/alleyinteractive/action-release) via a\n[built release workflow](./.github/workflows/built-release.yml) to compile and\ntag releases. Whenever a new version is detected in the root plugin's headers in\nthe `plugin.php` file or in the `composer.json` file, the workflow will\nautomatically build the plugin and tag it with a new version. The built tag will\ncontain all the required front-end assets the plugin may require. This works\nwell for publishing to WordPress.org or for submodule-ing.\n\nWhen you are ready to release a new version of the plugin, you can run\n`npm run release`/`composer release` to start the process of setting up a new\nrelease. If you want to do this manually you can follow these steps:\n\n1. Change the `Version` in the `plugin.php` file to a new higher-level version.\n\n\t```diff\n\t- * Version: 0.0.0\n\t+ * Version: 0.0.1\n\t```\n\n\t**✨ `npm run release` will do this for you automatically.**\n\n2. Commit your changes and push to the repository.\n3. Check the actions tab in the repository to see the progress of the release.\n   The action will automatically create a new tag and release for the plugin.\n   You are done!\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Credits\n\nThis project is actively maintained by [Alley\nInteractive](https://github.com/alleyinteractive). Like what you see? [Come work\nwith us](https://alley.co/careers/).\n\n- [author_name](https://github.com/author_name)\n- [All Contributors](../../contributors)\n\n## License\n\nThe GNU General Public License (GPL) license. Please see [License File](LICENSE) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falleyinteractive%2Fcreate-wordpress-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falleyinteractive%2Fcreate-wordpress-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falleyinteractive%2Fcreate-wordpress-plugin/lists"}