WP_CLI
Context{}
Context that can be selected in order to run commands within a properly set-up environment.
Хуков нет.
Использование
$Context = new Context(); // use class methods
Методы
- public process( $config )
Код Context{} Context{} WP-CLI 2.8.0-alpha
interface Context { const ADMIN = 'admin'; const AUTO = 'auto'; const CLI = 'cli'; const FRONTEND = 'frontend'; /** * Debugging group to use for all context-related debug messages. * * @var string */ const DEBUG_GROUP = 'context'; /** * Process the context to set up the environment correctly. * * @param array $config Associative array of configuration data. * @return void */ public function process( $config ); }