Main Plugin Instance
<?php
namespace DeepWebSolutions\Plugins\MyTestPlugin;
use DeepWebSolutions\Framework\Foundations\Plugin\AbstractPlugin;
\defined( 'ABSPATH' ) || exit;
class MyPlugin extends AbstractPlugin {
public function get_plugin_file_path(): string {
return $path_to_file_with_plugin_header_comment;
}
}
$plugin = new MyPlugin();
$plugin->initialize();
echo $plugin->get_plugin_version(); // echoes whatever the version header line is set to
Last updated