class-wcml-status-config-warnings-ui.php
1 month ago
class-wcml-status-media-ui.php
1 month ago
class-wcml-status-multi-currencies-ui.php
1 month ago
class-wcml-status-products-ui.php
1 month ago
class-wcml-status-status-ui.php
1 month ago
class-wcml-status-store-pages-ui.php
1 month ago
class-wcml-status-taxonomies-ui.php
1 month ago
class-wcml-status-ui.php
1 month ago
class-wcml-status-status-ui.php
50 lines
| 1 | <?php |
| 2 | |
| 3 | class WCML_Status_Status_UI extends WCML_Templates_Factory { |
| 4 | |
| 5 | private $sitepress; |
| 6 | |
| 7 | public function __construct( $sitepress ) { |
| 8 | parent::__construct(); |
| 9 | |
| 10 | $this->sitepress = $sitepress; |
| 11 | } |
| 12 | |
| 13 | public function get_model() { |
| 14 | |
| 15 | $model = [ |
| 16 | 'icl_version' => defined( 'ICL_SITEPRESS_VERSION' ), |
| 17 | 'st_version' => defined( 'WPML_ST_VERSION' ), |
| 18 | 'wc' => class_exists( 'WooCommerce' ), |
| 19 | 'icl_setup' => $this->sitepress->setup(), |
| 20 | 'strings' => [ |
| 21 | 'status' => __( 'Plugins Status', 'woocommerce-multilingual' ), |
| 22 | /* translators: %s is a plugin name */ |
| 23 | 'inst_active' => __( '%s is installed and active.', 'woocommerce-multilingual' ), |
| 24 | /* translators: %s is a plugin name */ |
| 25 | 'is_setup' => __( '%s is set up.', 'woocommerce-multilingual' ), |
| 26 | /* translators: %s is a plugin name */ |
| 27 | 'not_setup' => __( '%s is not set up.', 'woocommerce-multilingual' ), |
| 28 | 'wpml' => '<strong>WPML</strong>', |
| 29 | 'st' => '<strong>WPML String Translation</strong>', |
| 30 | 'wc' => '<strong>WooCommerce</strong>', |
| 31 | 'depends' => __( 'WPML Multilingual & Multicurrency for WooCommerce depends on several plugins to work. If any required plugin is missing, you should install and activate it.', 'woocommerce-multilingual' ), |
| 32 | ], |
| 33 | ]; |
| 34 | |
| 35 | return $model; |
| 36 | |
| 37 | } |
| 38 | |
| 39 | public function init_template_base_dir() { |
| 40 | $this->template_paths = [ |
| 41 | WCML_PLUGIN_PATH . '/templates/status/', |
| 42 | ]; |
| 43 | } |
| 44 | |
| 45 | public function get_template() { |
| 46 | return 'plugins-status.twig'; |
| 47 | } |
| 48 | |
| 49 | } |
| 50 |