Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Namespace #391

Merged
merged 5 commits into from
Dec 8, 2023
Merged

Namespace #391

merged 5 commits into from
Dec 8, 2023

Conversation

Ipstenu
Copy link
Contributor

@Ipstenu Ipstenu commented Dec 7, 2023

One of my long-term goals was to bring this repo up to MODERN PHP Standards (we Predate PHP 7, let alone 8!) and make it easier to update.

I used LWTV as my testbed to build out an autoloader, and restructured things as follows:

  • functions.php - Main Plugin file. Loads auto-loader, components, and defines.
  • /assets/ - Plugin assets
  • /bin/ - Scripts used for PHP Unit Testing
  • /node_scripts/ - Scripts used by Node to properly move content.
  • /php/ - All functional code
  • /plugins/ - Forked 3rd party plugins
  • /tests/ - Unit Tests

Instead of 100 top-level folders, all the code is in /php/ and uses the concept of implementing components that can be dynamically called.

The code is about 80% documented via DocBlocks, and the readme are up to date.

Components

A Component can be thought of as a sub-plugin. It is an atomic, independent module that stores business logic related to a specific feature. It may expose some template tags (functions) that can be called from within the theme.

All Components are stored in /php/ and the details of their use in /php/readme.md

To Do

  • Actually run a build on the CSS/JS to combine files (this would mean a lot of code-rewriting)
  • Have the blocks build to outside the PHP folder

@Ipstenu Ipstenu changed the base branch from production to development December 7, 2023 21:31
@Ipstenu Ipstenu merged commit 0af1f4d into development Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant