first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
class WPML_Theme_Plugin_Localization_UI {
const TEMPLATE_PATH = '/templates/theme-plugin-localization/';
/**
* @return IWPML_Template_Service
*/
private function get_template_service() {
$paths = array();
$paths[] = WPML_PLUGIN_PATH . self::TEMPLATE_PATH;
if ( defined( 'WPML_ST_PATH' ) ) {
$paths[] = WPML_ST_PATH . self::TEMPLATE_PATH;
}
$template_loader = new WPML_Twig_Template_Loader( $paths );
return $template_loader->get_template();
}
/**
* @param IWPML_Theme_Plugin_Localization_UI_Strategy $localization_strategy
*/
public function render( IWPML_Theme_Plugin_Localization_UI_Strategy $localization_strategy ) {
return $this->get_template_service()->show( $localization_strategy->get_model(), $localization_strategy->get_template() );
}
}