https://github.com/shivapoudel/wp-plugin-starter
Just another WordPress plugin starter.
https://github.com/shivapoudel/wp-plugin-starter
plugin wordpress wordpress-plugin
Last synced: 11 months ago
JSON representation
Just another WordPress plugin starter.
- Host: GitHub
- URL: https://github.com/shivapoudel/wp-plugin-starter
- Owner: shivapoudel
- Created: 2020-07-29T07:14:12.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-08-10T14:48:16.000Z (almost 3 years ago)
- Last Synced: 2023-12-18T07:20:37.304Z (over 2 years ago)
- Topics: plugin, wordpress, wordpress-plugin
- Language: PHP
- Homepage:
- Size: 969 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WP Plugin Starter
Welcome to the WP Plugin Starter repository on GitHub. Here you can browse the source, look at open issues and use this template to bootstrap your next WordPress plugin development.
Installation
---------------
### Requirements
WP Plugin Starter requires the following dependencies:
- [Node.js](https://nodejs.org/)
- [Composer](https://getcomposer.org/)
### Quick Start
Click "Use this template" at the top of this page, or click [here](https://github.com/shivapoudel/wp-plugin-starter/generate) to create your repo and clone locally to your `wp-content/plugins` directory. After that you'll need to do a four-step find and replace on the name in all the templates.
1. Search for `WP Plugin Starter` to capture the plugin name and replace with: `Plugin Name`.
2. Search for `WP_Plugin_Starter` to capture the plugin namespace and replace with: `Plugin_Name`.
3. Search for `wp-plugin-starter` to capture the plugin slug, textdomain, etc. and replace with: `plugin-name`.
4. Search for `WPS_` (in uppercase) to capture constants and replace with: `PLUGIN_NAME_`.
Then, rename the plugin main file `wp-plugin-starter.php` to use the plugin's slug. Next, update or delete this readme.
### Setup
To start using all the tools that come with WP Plugin Starter you need to install the necessary Node.js and Composer dependencies:
```sh
$ composer install
$ npm install
```
Without performing this step, if you try to activate the plugin it will simply show an admin notice.
### Available CLI commands
WP Plugin Starter comes packed with CLI commands tailored for WordPress plugin development:
- `npm run build` - builds the code for production.
- `npm run start` - starts the build for development.
- `npm run format` - formats files in the entire project’s directories.
- `npm run lint:js` – lints JavaScript files in the entire project’s directories.
- `npm run lint:css` – lints CSS and SCSS files in the entire project’s directories.
- `npm run lint:php` – lints PHP files in the entire project’s directories.
- `composer makepot` : Generates a .pot file in the `languages/` directory.
- `composer makepot-audit`: Generates a .pot file in the `languages/` directory and run audit.
Now you're ready to go! The next step is easy to say, but harder to do: make an awesome WordPress plugin. :)
Good luck!