plugins_loaded
最后更新于:2021-11-27 14:39:41
do_action( ‘plugins_loaded’ )
Fires once activated plugins have loaded.
源文件
文件: gc-settings.php
add_action( 'plugins_loaded', array( 'gcdocs_class_name', 'instance' ) ); class gcdocs_class_name { private function __construct() { self::init(); } public static function instance() { static $instance = null; if ( is_null( $instance ) ) { $instance = new class_name; } return $instance; } public function init() { gc_die( __( 'Hello World!', 'text-domain' ) ); } }