A scalable and advanced WordPress plugin boilerplate.
v3.3.0 (Changelog)
- PHP: 8.0 or higher
- WordPress: 5.0 or higher
- Composer: For dependency management
Clone or download this repository, and then you'll need to do a four-step CASE-SENSITIVE find and replace in all the codes:
- Search for
WordPressBoilerplatePluginto capture the namespaces. - Search for
FDWPBPto capture the constants. - Search for
fdwpbpto capture option name and slugs. - Search for
wordpress-boilerplate-pluginto capture the text domains.
Then, update the header in plugin.php with your own information.
AFTER you have done the find and replace, run this command in the plugin root:
$ composer install- Open terminal in the plugin root, and run this command to generate the POT file with WP-CLI:
$ wp i18n make-pot . languages/wordpress-boilerplate-plugin.pot-
Create translations with PoEdit:
- Open PoEdit and choose "Create new translation" or "New from POT file".
- Select
languages/wordpress-boilerplate-plugin.pot. - Choose your target language locale, for example
de_DEfor German. - Translate each string.
- Save the file as
languages/wordpress-boilerplate-plugin-de_DE.po. - PoEdit will automatically generate
languages/wordpress-boilerplate-plugin-de_DE.mo.
-
Keep translations up to date:
- After adding or changing strings, regenerate the POT file.
- Reopen the updated POT in PoEdit and choose "Update from POT file" to update your translations.
This project is licensed under the MIT License - see the LICENSE file for details.