Restore UM templates after theme update

This commit is contained in:
denisbaranov
2019-04-10 15:39:05 +03:00
parent a3fb633b5c
commit 863f00ffee
2 changed files with 207 additions and 0 deletions
+14
View File
@@ -509,6 +509,7 @@ if ( ! class_exists( 'UM' ) ) {
$this->columns();
$this->notices();
$this->admin_navmenu();
$this->theme_updater();
} elseif ( $this->is_request( 'admin' ) ) {
$this->admin();
$this->admin_menu();
@@ -523,6 +524,7 @@ if ( ! class_exists( 'UM' ) ) {
$this->plugin_updater();
$this->admin_gdpr();
$this->admin_navmenu();
$this->theme_updater();
} elseif ( $this->is_request( 'frontend' ) ) {
$this->enqueue();
$this->account();
@@ -645,6 +647,18 @@ if ( ! class_exists( 'UM' ) ) {
}
/**
* @since 2.0.45
* @return um\admin\core\Admin_Theme_Updater()
*/
function theme_updater() {
if ( empty( $this->classes['theme_updater'] ) ) {
$this->classes['theme_updater'] = new um\admin\core\Admin_Theme_Updater();
}
return $this->classes['theme_updater'];
}
/**
* @since 2.0
*/