homevrs / wp-libs
There is no license information available for the latest version (1.0.0) of this package.
Djia WP Libs
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
1.0.0
2025-01-18 21:34 UTC
Requires
- php: ^7.4
- defuse/php-encryption: ^2.4
This package is not auto-updated.
Last update: 2026-07-30 19:01:15 UTC
README
Some custom functions for my plugins Container for WP plugins. Example of usage
$registry = [
Request::class => static fn(): Request => Request::createFromGlobals(),
wpdb::class => static function(): wpdb {
global $wpdb;
return $wpdb;
},
'plugin_file' => static fn(): string => __FILE__,
'plugin_path' => static fn(): string => plugin_dir_path(__FILE__),
'plugin_url' => static fn(): string => plugin_dir_url(__FILE__),
];
$container = Container::createInstance($registry);
/* @var MainPluginClass $main */
$main = $container->get(MainPluginClass::class);