Skip to content

Commit 54eb266

Browse files
committed
Update file and class name
1 parent 32f07ff commit 54eb266

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

.github/copilot-instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is a **modern WordPress plugin boilerplate** using PSR-4 namespacing (`Word
77
### Core Components
88

99
- **`includes/main.php`**: Singleton main class that orchestrates the entire plugin lifecycle
10-
- **`includes/Plugin_Autoloader.php`**: Custom PSR-4 autoloader (replaces composer autoloader for plugin classes)
10+
- **`includes/Autoloader.php`**: Custom PSR-4 autoloader (replaces composer autoloader for plugin classes)
1111
- **`includes/loader.php`**: Centralized hook registration system - all WordPress hooks go through this
1212
- **`admin/` & `public/`**: Separate namespaces for admin-only and public-facing functionality
1313

@@ -69,15 +69,15 @@ public/Main.php # Public-facing functionality
6969
includes/ # Core plugin classes
7070
├── main.php # Main orchestrator
7171
├── loader.php # Hook management
72-
├── Plugin_Autoloader.php # Custom autoloader
72+
├── Autoloader.php # Custom autoloader
7373
├── activator.php # Plugin activation
7474
└── deactivator.php # Plugin deactivation
7575
```
7676

7777
## Composer Integration
7878

7979
The plugin uses **dual autoloading**:
80-
1. **Custom autoloader** for plugin classes (`Plugin_Autoloader.php`)
80+
1. **Custom autoloader** for plugin classes (`Autoloader.php`)
8181
2. **Composer autoloader** for third-party dependencies
8282

8383
### Adding Dependencies
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Class WordPress_Plugin_Boilerplate\Includes\Plugin_Autoloader
3+
* Class WordPress_Plugin_Boilerplate\Includes\Autoloader
44
*
55
* @since 0.0.1
66
* @package WordPress_Plugin_Boilerplate
@@ -19,7 +19,7 @@
1919
*
2020
* @since 0.0.1
2121
*/
22-
class Plugin_Autoloader {
22+
class Autoloader {
2323

2424
/**
2525
* Plugin root namespace.

includes/main.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ final class Main {
4646
*
4747
* @since 0.0.1
4848
* @access protected
49-
* @var Plugin_Autoloader $autoloader The plugin autoloader instance.
49+
* @var Autoloader $autoloader The plugin autoloader instance.
5050
*/
5151
protected $autoloader;
5252

@@ -118,7 +118,7 @@ public function __construct() {
118118
// Load the autoloader class manually before registering it
119119
$plugin_path = WORDPRESS_PLUGIN_BOILERPLATE_PLUGIN_PATH;
120120

121-
require_once $plugin_path . 'includes/Plugin_Autoloader.php';
121+
require_once $plugin_path . 'includes/Autoloader.php';
122122

123123
$this->register_autoloader();
124124

@@ -199,7 +199,7 @@ private function register_autoloader() {
199199
$plugin_path = WORDPRESS_PLUGIN_BOILERPLATE_PLUGIN_PATH;
200200

201201
// Create autoloader instance
202-
$this->autoloader = new Plugin_Autoloader( 'WordPress_Plugin_Boilerplate', $plugin_path );
202+
$this->autoloader = new Autoloader( 'WordPress_Plugin_Boilerplate', $plugin_path );
203203

204204
// Register the autoloader
205205
spl_autoload_register( array( $this->autoloader, 'autoload' ) );
@@ -355,7 +355,7 @@ public function get_loader() {
355355
* The reference to the autoloader instance.
356356
*
357357
* @since 0.0.1
358-
* @return Plugin_Autoloader The plugin autoloader instance.
358+
* @return Autoloader The plugin autoloader instance.
359359
*/
360360
public function get_autoloader() {
361361
return $this->autoloader;

0 commit comments

Comments
 (0)