aS.c Boiler Plate
WordPress Boiler Plate Plugin using a modern directory structure and PSR-4 autoloader with core, admin, and front namespaces
by aSolution.company · github.com/asolutioncompany/asc-boiler-plate · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/asolutioncompany/asc-boiler-plate/archive/refs/heads/master.zipWordPress plugin boilerplate with autoloader, Core, Admin, and Front structure.
Requires: PHP 8.1+, WordPress 5.x Tested with: WordPress 6.9.1, PHP 8.3 Version: 1.0.0
Prefixes: asc-boiler-plate (slug, handles, classes), asc_boiler_plate (options, JS object names). Use search/replace to rename when starting a new plugin.
Structure
- asc-boiler-plate.php – Bootstrap: constant, autoloader, activation/deactivation/uninstall hooks, Core singleton.
- includes/Core/Core.php – Lifecycle hooks, plugin URL/path, text domain; loads Admin and Front.
- includes/Admin/Admin.php – Settings page (Settings → aS.c Boiler Plate) and admin asset enqueue on that page only.
- includes/Front/Front.php – Front-end asset enqueue (front.css, front.js, localized AJAX).
- assets/admin/ – admin.css, admin.js (jQuery, localized
asc_boiler_plate_adminwithajax_url,ajax_nonce). - assets/front/ – front.css, front.js (jQuery, localized
asc_boiler_plate_front).
Setup
- Copy this folder (or move it) to
wp-content/plugins/asc-boiler-plate/. - Run
composer installin the plugin directory. - Activate the plugin.
- Go to Settings → aS.c Boiler Plate to see the placeholder settings page (admin CSS/JS load there).
Starting a new plugin
- Copy the boilerplate to a new folder (e.g.
my-plugin). - Search/replace:
asc-boiler-plate→my-plugin,asc_boiler_plate→my_plugin,ASC\BoilerPlate→ your namespace,aS.c Boiler Plate→ your plugin name. - Rename the main file to
my-plugin.phpand update the constant and hooks as needed.