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.

Maintainers

Package info

bitbucket.org/homevrs/wp-libs

pkg:composer/homevrs/wp-libs

Transparency log

Statistics

Installs: 84

Dependents: 0

Suggesters: 0

1.0.0 2025-01-18 21:34 UTC

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);