Skip to content

About

A scalable and advanced WordPress plugin boilerplate

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

108 Commits

Folders and files

Repository files navigation

WordPress Plugin Boilerplate

A scalable and advanced WordPress plugin boilerplate.

v3.4.0 (Changelog)

Requirements

  • PHP: 8.0 or higher
  • WordPress: 5.0 or higher
  • Composer: For dependency management

Installation

Clone or download this repository, and then you'll need to do a four-step CASE-SENSITIVE find and replace in all the codes:

  1. Search for WordPressBoilerplatePlugin to capture the namespaces.
  2. Search for FDWPBP to capture the constants.
  3. Search for fdwpbp to capture option name and slugs.
  4. Search for wordpress-boilerplate-plugin to capture the text domains.

Then, update the header in plugin.php with your own information.

Composer Setup

AFTER you have done the find and replace, run this command in the plugin root:

$ composer install

API Examples

You can find API endpoints implementation in the Telegram Bot WordPress Plugin Boilerplate repository.

Translating the Plugin

  1. 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
  1. 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_DE for 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.
  2. 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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A scalable and advanced WordPress plugin boilerplate

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages