Use TypechoPlugin\ for plugin namespace

This commit is contained in:
joyqi
2021-09-16 17:53:59 +08:00
parent ec495d7e24
commit fc9aaf66f3
3 changed files with 34 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
<?php
namespace HelloWorld;
namespace TypechoPlugin\HelloWorld;
use Typecho\Plugin\PluginInterface;
use Typecho\Widget\Helper\Form;
@@ -26,7 +26,7 @@ class Plugin implements PluginInterface
*/
public static function activate()
{
\Typecho\Plugin::factory('admin/menu.php')->navBar = ['HelloWorld_Plugin', 'render'];
\Typecho\Plugin::factory('admin/menu.php')->navBar = __CLASS__ . '::render';
}
/**