Merge remote-tracking branch 'remotes/origin/feature/restore_um_templates_after_theme_update'

This commit is contained in:
nikitasinelnikov
2019-04-14 21:20:26 +03:00
2 changed files with 207 additions and 0 deletions
+14
View File
@@ -512,6 +512,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();
@@ -526,6 +527,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();
@@ -648,6 +650,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
*/