server/web/app/plugins/f-translate/inc/namespace.php
Chuck Adams 82911790e4
add ignored plugin files
Signed-off-by: Chuck Adams <chaz@chaz.works>
2026-01-03 15:10:13 -07:00

24 lines
792 B
PHP

<?php
namespace FAIRServer\Translate;
use WP_CLI;
function bootstrap() {
add_action( 'gp_tmpl_load_locations', __NAMESPACE__ . '\\add_template_locations', 50, 4 );
// Load the command class.
if ( defined( 'WP_CLI' ) && WP_CLI ) {
// WP_CLI::add_command( 'fair-translate', '__return_null' );
WP_CLI::add_command( 'fair-translate project', __NAMESPACE__ . '\\ProjectCommand' );
WP_CLI::add_command( 'fair-translate translation-set', __NAMESPACE__ . '\\TranslationSetCommand' );
}
Stats\bootstrap();
}
function add_template_locations( $locations, $template, $args, $template_path ) {
// Add the theme directories to the template locations.
$locations[] = get_stylesheet_directory() . '/glotpress';
$locations[] = get_template_directory() . '/glotpress';
return $locations;
}