https://github.com/jitesoft/wp-base
Internal base package for jitesoft wordpress plugins - not a plugin itself.
https://github.com/jitesoft/wp-base
hacktoberfest php plugin wordpress
Last synced: 27 days ago
JSON representation
Internal base package for jitesoft wordpress plugins - not a plugin itself.
- Host: GitHub
- URL: https://github.com/jitesoft/wp-base
- Owner: jitesoft
- License: mit
- Created: 2021-08-19T15:37:29.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-08-15T19:16:50.000Z (almost 4 years ago)
- Last Synced: 2025-10-19T09:16:44.562Z (8 months ago)
- Topics: hacktoberfest, php, plugin, wordpress
- Language: PHP
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wp-base
This is not a plugin, nor really anything more than a core part with a few
minor functions for jitesoft WordPress plugins.
The lib allows the jitesoft(...) method to be called, which basically contains
a static container which can be queried for objects.
In case a jitesoft plugin uses the base package, it will inject
the object into the container making it available to easily query from anywhere:
```php
debug(...);
```
Depending on the type of plugin, the object could be either of a singleton type
(which means that it won't be re-created) or as a standard object.
You could make use of the object in other plugins if wanted, but there will be
no real support of the package.
## Basic usage
```php
// Add something
Jitesoft\WordPress\Plugins\Base\getContainer()->bind('something', 'something');
// Get something
Jitesoft\WordPress\Plugins\Base\getContainer()->get('something'); // 'something'
// Get something via convenience method
jitesoft('something'); // 'something'
```
For full documentation about the underlying container, check out
[jitesoft/container](https://packagist.org/packages/jitesoft/container)
## License
MIT