WordPress Plugin Foundation
The WordPress Plugin Foundation is a library for rapid WordPress plugin development. It uses PHP 5.3+ features such as namespaces. It provides a sensible structure that should meet the needs of most plugins and exposes WordPress APIs in a sensible, declarative manner.
- A stable, declarative, human-readable syntax (YAML) for describing common changes to the backend of WordPress
- Implementation handled by smart code that does The Right Thing, all the time
- Excepting major version jumps with syntax revisions, updating the plugin foundation should never break plugins that rely on it. Behavior and appearance, however, may be altered (hopefully for the better)
- The same plugin foundation code can be shared between multiple plugins without any problems
The plugin grew in a very ad hoc fashion. Features were added as needed in order to complete various web projects.
Features and revisions that are in the pipeline include:
- More robust and granular permissions management, including the addition of a permissions manifest
- Plugin activation actions
- ~Run-once code (such as modifying permissions, which now is wastefully done every time...)~
- Caching of YAML output
- An import-scheme that allows re-use and recombination of YAML manifests
- Exposing additional WordPess APIs, including internal, undocumented features
- Adopting a consistent style guide for the codebase. This may or may not be the WordPress style guide
- ~Adding an autoloading system for use in the foundation and plugins that utilize the foundation~ Now is PSR-4 compliant.
- ~Infinite nesting of compound fields (currently able to nest, but not infinitely without problems). This will require actually designing for that feature; the current system is crude and bolted on~
- Unit testing (currently there is none at all)
- A validation class
WordPress asserts that plugins and themes inherit the GPL license, as derivative works that share memory and other such resources when the code is run on the server.