wpseo_cli_init() Yoast 1.0
Initialize the WP-CLI integration.
The WP-CLI integration needs PHP 5.3 support, which should be automatically enforced by the check for the WP_CLI constant. As WP-CLI itself only runs on PHP 5.3+, the constant should only be set when requirements are met.
Хуков нет.
Возвращает
Null. Ничего.
Использование
wpseo_cli_init();
Код wpseo_cli_init() wpseo cli init Yoast 15.6.2
function wpseo_cli_init() {
if ( WPSEO_Utils::is_yoast_seo_premium() ) {
WP_CLI::add_command(
'yoast redirect list',
'WPSEO_CLI_Redirect_List_Command',
[ 'before_invoke' => 'WPSEO_CLI_Premium_Requirement::enforce' ]
);
WP_CLI::add_command(
'yoast redirect create',
'WPSEO_CLI_Redirect_Create_Command',
[ 'before_invoke' => 'WPSEO_CLI_Premium_Requirement::enforce' ]
);
WP_CLI::add_command(
'yoast redirect update',
'WPSEO_CLI_Redirect_Update_Command',
[ 'before_invoke' => 'WPSEO_CLI_Premium_Requirement::enforce' ]
);
WP_CLI::add_command(
'yoast redirect delete',
'WPSEO_CLI_Redirect_Delete_Command',
[ 'before_invoke' => 'WPSEO_CLI_Premium_Requirement::enforce' ]
);
WP_CLI::add_command(
'yoast redirect has',
'WPSEO_CLI_Redirect_Has_Command',
[ 'before_invoke' => 'WPSEO_CLI_Premium_Requirement::enforce' ]
);
WP_CLI::add_command(
'yoast redirect follow',
'WPSEO_CLI_Redirect_Follow_Command',
[ 'before_invoke' => 'WPSEO_CLI_Premium_Requirement::enforce' ]
);
}
}