add hook for add default settings after creating new subsite

This commit is contained in:
andrewshuba
2019-04-24 14:02:47 +03:00
parent 9a5bced26b
commit 37c3ff473b
2 changed files with 71 additions and 1 deletions
+19 -1
View File
@@ -556,6 +556,12 @@ if ( ! class_exists( 'UM' ) ) {
$this->mobile();
$this->external_integrations();
$this->gdpr();
//if multisite networks active
if ( is_multisite() ) {
$this->multisite();
}
}
@@ -1405,6 +1411,19 @@ if ( ! class_exists( 'UM' ) ) {
return $this->classes['mobile'];
}
/**
* @since 2.0.44
*
* @return um\lib\mobiledetect\Um_Mobile_Detect
*/
function multisite() {
if ( empty( $this->classes['multisite'] ) ) {
$this->classes['multisite'] = new um\core\Multisite();
}
return $this->classes['multisite'];
}
/**
* Include files with hooked filters/actions
@@ -1453,7 +1472,6 @@ if ( ! class_exists( 'UM' ) ) {
function widgets_init() {
register_widget( 'um\widgets\UM_Search_Widget' );
}
}
}