Updated Plugin Architecture (markdown)

Ben Goldsworthy 2021-04-25 16:43:10 +01:00
parent 66c52a0162
commit 2bf6db38a6

@ -44,14 +44,14 @@ It has been initially produced as part of [Issue #87](https://github.com/markche
## Plugin Source Root Directories ## Plugin Source Root Directories
| File Name | Description | | Dir. Name | Description |
|------|-------------| |------|-------------|
| `class/` | Contains the Plugin PHP code, providing most of its functionality. | | `class/` | Contains the Plugin PHP code, providing most of its functionality. |
| `css/` | Contains the Plugin stylesheets. | | `css/` | Contains the Plugin stylesheets. |
| `img/` | Contains images used by the Plugin (@todo can this be merged with the root `assets/` dir?). | | `img/` | Contains images used by the Plugin (@todo can this be merged with the root `assets/` dir?). |
| `js/` | Contains JavaScript files used by the Plugin. | | `js/` | Contains JavaScript files used by the Plugin. |
| `languages/` | Contains Plugin translation files for various languages. | | `languages/` | Contains Plugin translation files for various languages. |
| `templates/` | Contains HTML template files used by the Plugin. | | `templates/` | Contains HTML template files used by the Plugin to render various page elements. |
## `class/` Sub-directory ## `class/` Sub-directory
@ -73,6 +73,26 @@ Important files are highlighted in **bold** text.
### `class/` Sub-directories ### `class/` Sub-directories
| Dir. Name | Description |
|------|-------------|
| `dashboard/` | Contains the files that handle dashboard page construction. |
| `widgets/` | Contains the files that handle widget construction. |
### `class/dashboard/` Sub-sub-directory
#### `class/dashboard/` Files
| File Name | Description | | File Name | Description |
|------|-------------| |------|-------------|
| `footnotes.php` | The Plugin entry point. | | `init.php` | Initialises the Plugin settings page. |
| `layout.php` | Defines a common interface for rendering dashboard pages (@todo merge with `subpage-main.php`) |
| `subpage-main.php` | Defines the Plugin settings page layout. |
### `class/widgets/` Sub-sub-directory
#### `class/widgets/` Files
| File Name | Description |
|------|-------------|
| `base.php` | Defines a base class for all widgets. |
| `reference-container.php` | Defines the Reference Container widget. |