[ Index ] |
PHP Cross Reference of GlotPress |
[Summary view] [Print] [Text view]
1 <?php 2 3 if ( defined( 'WP_CLI' ) && WP_CLI ) { 4 gp_cli_register(); 5 } 6 7 function gp_cli_register() { 8 require_once GP_PATH . GP_INC . 'cli/add-admin.php'; 9 require_once GP_PATH . GP_INC . 'cli/branch-project.php'; 10 require_once GP_PATH . GP_INC . 'cli/import-originals.php'; 11 require_once GP_PATH . GP_INC . 'cli/regenerate-paths.php'; 12 require_once GP_PATH . GP_INC . 'cli/remove-multiple-currents.php'; 13 require_once GP_PATH . GP_INC . 'cli/translation-set.php'; 14 require_once GP_PATH . GP_INC . 'cli/upgrade-set-permissions.php'; 15 require_once GP_PATH . GP_INC . 'cli/wipe-permissions.php'; 16 17 // Legacy commands. 18 WP_CLI::add_command( 'glotpress add-admin', 'GP_CLI_Add_Admin' ); 19 WP_CLI::add_command( 'glotpress branch-project', 'GP_CLI_Branch_Project' ); 20 WP_CLI::add_command( 'glotpress import-originals', 'GP_CLI_Import_Originals' ); 21 WP_CLI::add_command( 'glotpress regenerate-paths', 'GP_CLI_Regenerate_Paths' ); 22 WP_CLI::add_command( 'glotpress remove-multiple-currents', 'GP_CLI_Remove_Multiple_Currents' ); 23 WP_CLI::add_command( 'glotpress upgrade-set-permissions', 'GP_CLI_Upgrade_Set_Permissions' ); 24 WP_CLI::add_command( 'glotpress wipe-permissions', 'GP_CLI_Wipe_Permissions' ); 25 26 // New style commands. 27 WP_CLI::add_command( 'glotpress translation-set', 'GP_CLI_Translation_Set' ); 28 29 // CLI related filters. 30 add_filter( 'gp_pre_can_set_translation_status', '__return_true' ); 31 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Dec 22 01:01:04 2024 | Cross-referenced by PHPXref 0.7.1 |