diff --git a/src/Hyyan/WPI/Admin/StatusReport.php b/src/Hyyan/WPI/Admin/StatusReport.php
new file mode 100644
index 0000000..246e41a
--- /dev/null
+++ b/src/Hyyan/WPI/Admin/StatusReport.php
@@ -0,0 +1,56 @@
+
+
+
+
+
+ |
+
+
+
+
+ : |
+ |
+ |
+
+
+ : |
+ |
+ |
+
+
+ : |
+ |
+ 'locale' ) );
+
+ foreach ( $langs as $langId => $langLocale ) {
+ echo($langLocale);
+ $downloaded = TranslationsDownloader::isDownloaded( $langLocale );
+ $location = sprintf(
+ trailingslashit( WP_LANG_DIR )
+ . 'plugins/woocommerce-%s.mo', $langLocale
+ );
+ if ( $downloaded ) {
+ echo(' (WooCommerce translation file found OK at ' . $location . ') ');
+ } else {
+ echo(' Warning - missing WooCommerce translation file NOT found at ' . $location . ' ');
+ }
+ echo ' ';
+ }
+ ?> |
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Hyyan/WPI/Plugin.php b/src/Hyyan/WPI/Plugin.php
index 65c00a4..8486e14 100644
--- a/src/Hyyan/WPI/Plugin.php
+++ b/src/Hyyan/WPI/Plugin.php
@@ -37,6 +37,7 @@ public function __construct()
add_action('init', array($this, 'activate'));
add_action('plugins_loaded', array($this, 'loadTextDomain'));
+ add_action( 'admin_init', array( __CLASS__, 'admin_activate' ) );
add_action( 'pll_add_language', array( __CLASS__, 'handleNewLanguage' ) );
@@ -53,6 +54,13 @@ public function __construct()
}
}
+ /*
+ * enable admin features in admin mode
+ */
+ public static function admin_activate() {
+ include_once( plugin_dir_path( __FILE__ ) . 'Admin/StatusReport.php');
+ }
+
/*
* when new language is added in polylang, flag that default pages should be rechecked
* (try not to download immediately as translation files will not be downloaded yet)