diff --git a/0.-Home.md b/0.-Home.md deleted file mode 100644 index f844075..0000000 --- a/0.-Home.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the footnotes wiki! diff --git a/1-Plugin-Architecture.md b/1-Plugin-Architecture.md new file mode 100644 index 0000000..ba786e4 --- /dev/null +++ b/1-Plugin-Architecture.md @@ -0,0 +1,98 @@ +This Wiki page outlines how the Plugin is constructed and what does what. + +It has been initially produced as part of [Issue #87](https://github.com/markcheret/footnotes/issues/87), but is a living document and is intended to keep up-to-date with changes to the project structure. As such, it is only intended to provide a high-level overview; more detailed documentation can be found in the automatically-generated documentation [here](https://markcheret.github.io/footnotes/). + +# Top-Level Repo. Layout + +| Dir. Name | Description | +|------|-------------| +| `assets/` | Files to be stored in the [`assets/` directory](https://plugins.svn.wordpress.org/footnotes/assets/) on the SVN repo. (e.g., screenshots for the Plugin information page). | +| `docs/` | Automatically-generated documentation files. | +| `src/` | The source code for the Plugin itself. | +| `_tools/` | Useful Bash scripts (@todo this should eventually be merged with `.github/workflows/`). | +| `.github/` | GitHub Actions workflows and Issue templates. | + +# Root Files + +| File Name | Description | +|------|-------------| +| `CHANGELOG.md` | The full project changelog. | +| `CODE_OF_CONDUCT.md` | The project CoC. | +| `composer.json` & `composer.lock` | Declares Composer dependencies and scripts. | +| `CONTRIBUTING.md` | A guide to contributing to the project. | +| `LICENSE` | The license under which the project is released. | +| `package.json` & `package-lock.json` | Declares NPM dependencies and scripts. | +| `README.md` | Provides an overview of the project. | +| `SECURITY.md` | Provides guidance on reporting security-related issues. | +| `wpml-config.xml` | Used by the [WPML Plugin](https://wpml.org/documentation/support/language-configuration-files/) for translation. | +| `.distignore` | Lists files to ignore when building the Plugin for distribution (@todo this is not currently used). | +| `.eslintignore` & `.eslintrc.js` | Config. files for JavaScript linting. | +| `.gitignore` | Lists files to exclude from Git version control. | +| `.prettierignore` & `.prettierrc` | Config. files for JavaScript formatting. | +| `.stylelintignore` & `.stylelinttc.json` | Config. files for stylesheet linting. | + +# Plugin Source (`src/`) Layout + +## Plugin Source Root Files + +| File Name | Description | +|------|-------------| +| `footnotes.php` | The Plugin entry point. | +| `includes.php` | Includes all of the PHP files. | +| `license.txt` | The license under which the Plugin is released. | +| `readme.txt` | The Plugin readme for display on the WordPress Plugin Directory. | + +## Plugin Source Root Directories + +| Dir. Name | Description | +|------|-------------| +| `class/` | Contains the Plugin PHP code, providing most of its functionality. | +| `css/` | Contains the Plugin stylesheets. | +| `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. | +| `languages/` | Contains Plugin translation files for various languages. | +| `templates/` | Contains HTML template files used by the Plugin to render various page elements. | + +## `class/` Sub-directory + +### `class/` Root Files + +Important files are highlighted in **bold** text. + +| File Name | Description | +|------|-------------| +| `config.php` | Defines various constants (@todo rename to something more accurate). | +| `convert.php` | Provides various conversion functions. | +| `hooks.php` | Registers actions with various WordPress hooks. | +| **`init.php`** | Defines the Plugin object. | +| `language.php` | Loads translation settings. | +| **`settings.php`** | Defines the various Plugin settings. | +| **`task.php`** | Provides the core function of the Plugin. | +| `templates.php` | Loads the various template files. | +| `wysiwyg.php` | Provides integration with the WordPress WYSIWYG editor. | + +### `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 | +|------|-------------| +| `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. | \ No newline at end of file diff --git a/1.-Plugin-Architecture.md b/1.-Plugin-Architecture.md deleted file mode 100644 index ea0bfcf..0000000 --- a/1.-Plugin-Architecture.md +++ /dev/null @@ -1,14 +0,0 @@ -This Wiki page outlines how the Plugin is constructed and what does what. - -It has been initially produced as part of [Issue #87](https://github.com/markcheret/footnotes/issues/87), but is a living document and is intended to keep up-to-date with changes to the project structure. As such, it is only intended to provide a high-level overview; more detailed documentation can be found in the automatically-generated documentation [here](https://markcheret.github.io/footnotes/). - -1. Repo. Root -1. Plugin Source directory (`src/`) - 1. Plugin classes sub-directory (`src/class/`) - 1. Plugin Dashboard sub-directory (`src/class/dashboard/`) - 1. Plugin Widgets sub-directory (`src/class/widgets/`) - 1. Plugin stylesheets sub-directory (`src/css/`) - 1. Plugin images sub-directory (`src/img/`) - 1. Plugin scripts sub-directory (`src/js/`) - 1. Plugin translations sub-directory (`src/languages/`) - 1. Plugin templates sub-directory (`src/templates/`) \ No newline at end of file diff --git a/1.1.-Repo.-Root.md b/1.1-Repo.-Root.md similarity index 100% rename from 1.1.-Repo.-Root.md rename to 1.1-Repo.-Root.md diff --git a/1.2.-Plugin-Source-Directory.md b/1.2-Plugin-Source-Directory.md similarity index 100% rename from 1.2.-Plugin-Source-Directory.md rename to 1.2-Plugin-Source-Directory.md diff --git a/1.2.1-Plugin-Classes-Directory.md b/1.2.1-Plugin-Classes-Directory.md new file mode 100644 index 0000000..713547c --- /dev/null +++ b/1.2.1-Plugin-Classes-Directory.md @@ -0,0 +1,22 @@ +# `class/` Root Files + +Important files are highlighted in **bold** text. + +| File Name | Description | +|------|-------------| +| `config.php` | Defines various constants (@todo rename to something more accurate). | +| `convert.php` | Provides various conversion functions. | +| `hooks.php` | Registers actions with various WordPress hooks. | +| **`init.php`** | Defines the Plugin object. | +| `language.php` | Loads translation settings. | +| **`settings.php`** | Defines the various Plugin settings. | +| **`task.php`** | Provides the core function of the Plugin. | +| `templates.php` | Loads the various template files. | +| `wysiwyg.php` | Provides integration with the WordPress WYSIWYG editor. | + +# `class/` Sub-directories + +| Dir. Name | Description | +|------|-------------| +| `dashboard/` | Contains the files that handle dashboard page construction. | +| `widgets/` | Contains the files that handle widget construction. | \ No newline at end of file diff --git a/1.2.1.1-Plugin-Dashboard-Directory.md b/1.2.1.1-Plugin-Dashboard-Directory.md new file mode 100644 index 0000000..a05681a --- /dev/null +++ b/1.2.1.1-Plugin-Dashboard-Directory.md @@ -0,0 +1,7 @@ +# Files + +| File Name | Description | +|------|-------------| +| `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. | diff --git a/1.2.1.2-Plugin-Widgets-Directory.md b/1.2.1.2-Plugin-Widgets-Directory.md new file mode 100644 index 0000000..88e8037 --- /dev/null +++ b/1.2.1.2-Plugin-Widgets-Directory.md @@ -0,0 +1,6 @@ +# Files + +| File Name | Description | +|------|-------------| +| `base.php` | Defines a base class for all widgets. | +| `reference-container.php` | Defines the Reference Container widget. | diff --git a/2.-Git-Tips.md b/2-Git-Tips.md similarity index 100% rename from 2.-Git-Tips.md rename to 2-Git-Tips.md diff --git a/3.-Versioning.md b/3-Versioning.md similarity index 100% rename from 3.-Versioning.md rename to 3-Versioning.md diff --git a/4.-SVN-Release-Guide.md b/4-SVN-Release-Guide.md similarity index 100% rename from 4.-SVN-Release-Guide.md rename to 4-SVN-Release-Guide.md diff --git a/A.-Custom-Template-Stack.textile b/A.1-Custom-Template-Stack.textile similarity index 100% rename from A.-Custom-Template-Stack.textile rename to A.1-Custom-Template-Stack.textile diff --git a/B.-Customised-Documentation-Schema.textile b/A.2-Customised-Documentation-Schema.textile similarity index 100% rename from B.-Customised-Documentation-Schema.textile rename to A.2-Customised-Documentation-Schema.textile