The BEA Plugin Boilerplate serves as a foundation off of which to build your WordPress plugins.
For making this plugin easily usable, you can make the given replacements please enable the case sensitive search and then :
- Search for:
bea-plugin-boilerplate
and replace with:my-plugin
- Search for:
BEA\PB
and replace with:BEA\My_plugin
- Search for:
BEA_PB_
and replace with:MY_PLUGIN_
- Search for:
Plugin Boilerplate
and replace with:My plugin name
- Search for:
init_bea_pb_plugin
and replace with:init_my_plugin
- Search for:
bea-pb
and replace with:my-plugin
Then you have to rename the bea-plugin-boilerplate.php
to my-plugin.php
and edit the plugin header.
You need composer to autoload all your classes from the classes folder.
Use the beapi/composer-scaffold-plugin
package that add it automatically to the composer.json file.
You can add it yourself like this :
"autoload": {
"psr-4": {
"BEA\PB\\": "content/plugins/bea-plugin-boilerplate/classes/"
}
}
The autoload is based on psr-4 and handled by composer.
- 23 Oct 2023
- Add missing composer psalm command
- Use
plugin_basename()
to get plugin directory - Fix various PHPCS & Psalm warnings and errors
- 23 Nov 2021
- Fix wrong formatting for block ACF classes
- 20 Sept 2021
- Fix wrong return type in Model class
- Remove Compatibility class
- Remove default Admin class
- 15 March 2021
- Fix all PSALM errors
- Enhance the phpcs:ignore rules to be compatible with skeleton
- Use shortarray syntax
- Enforce return types
- Use InvalidArgumentException when model wrongly instaciated
- Remove thumbnail deletion on remove_post_thumnail
- Rename get_ID to get_id
- Add psalm
- Remove
_*
methods from Models
- 1 March 2021
- Introduce interfaces and abstract classes to register Gutenberg blocks
- Update copyright date.
- Fev 2021
- Rename hook :
BEA/Helpers/locate_template/templates
inbeapi_helpers_locate_template_templates
for PHPCS - Improve PHPCS
- Jan 2021
- Update Singleton to be compatible with PHP8.0
- May 2020
- Remove autoload.php file, it's have to be on the composer.json file autoloading
- Move compatibility class to the classes directory
- Use the PSR-4 naming convention
- February 2019
- Remove widget feature
- August 2018
- Fix misuse of singleton in shortcode factory
- 14 June 2017
- Fix wrong use of get_object_term_cache() and php Exception
- 22 Nov 2016
- Fix Non-static method init_translations() should not be called statically
- 15 Nov 2016
- Fix method get_model using model_class in post_type
- 06 Oct 2016
- Fix textdomain load
- Add french translations
- 13 April 2016
- Fix model class name with namespace
- 16 Mar 2016
- Fix user model filename
- 6 Mar 2016
- Fix plugin version number
- 12 Feb 2016
- Add Shortcode implementation
- 11 Jan 2016
- Fix title display in widget view
- 13 Oct 2015
- Add traits
- 30 Sep 2015
- Fix widget registration
- 4 Sep 2015
- 4 Sep 2015
- Add new filter on locate_template
- 18 Feb 2016
- Initial