- review for secure functionality;

This commit is contained in:
Mykyta Synelnikov
2023-07-07 00:34:11 +03:00
parent 25aa40b1c2
commit 75e3ce9391
16 changed files with 1247 additions and 438 deletions
+36 -27
View File
@@ -527,7 +527,7 @@ if ( ! class_exists( 'UM' ) ) {
}
//run setup
$this->common()->create_post_types();
$this->common()->cpt()->create_post_types();
$this->setup()->run_setup();
}
@@ -549,10 +549,11 @@ if ( ! class_exists( 'UM' ) ) {
*/
public function includes() {
$this->common();
$this->common()->includes();
$this->access();
if ( $this->is_request( 'ajax' ) ) {
$this->ajax()->includes();
$this->admin();
$this->ajax_init();
$this->admin_ajax_hooks();
@@ -565,6 +566,7 @@ if ( ! class_exists( 'UM' ) ) {
$this->plugin_updater();
$this->theme_updater();
} elseif ( $this->is_request( 'admin' ) ) {
$this->admin()->includes();
$this->admin();
$this->admin_menu();
$this->admin_upgrade();
@@ -572,8 +574,6 @@ if ( ! class_exists( 'UM' ) ) {
$this->columns();
$this->admin_enqueue();
$this->metabox();
$this->admin()->notices();
$this->admin()->secure();
$this->users();
$this->dragdrop();
$this->admin_gdpr();
@@ -581,6 +581,7 @@ if ( ! class_exists( 'UM' ) ) {
$this->plugin_updater();
$this->theme_updater();
} elseif ( $this->is_request( 'frontend' ) ) {
$this->frontend()->includes();
$this->enqueue();
$this->account();
$this->password();
@@ -651,21 +652,6 @@ if ( ! class_exists( 'UM' ) ) {
return $this->classes['blocks'];
}
/**
* @since 2.6.7
*
* @return um\core\Secure()
*/
public function secure() {
if ( empty( $this->classes['secure'] ) ) {
$this->classes['secure'] = new um\core\Secure();
}
return $this->classes['secure'];
}
/**
* Get extension API
*
@@ -704,19 +690,43 @@ if ( ! class_exists( 'UM' ) ) {
return $this->classes[ $key ];
}
/**
* @since 2.6.8
*
* @return um\ajax\Init
*/
public function ajax() {
if ( empty( $this->classes['um\ajax\init'] ) ) {
$this->classes['um\ajax\init'] = new um\ajax\Init();
}
return $this->classes['um\ajax\init'];
}
/**
* @since 2.0
* @since 2.6.8 changed namespace and class content.
*
* @return um\core\Common()
* @return um\common\Init
*/
function common() {
if ( empty( $this->classes['common'] ) ) {
$this->classes['common'] = new um\core\Common();
public function common() {
if ( empty( $this->classes['um\common\init'] ) ) {
$this->classes['um\common\init'] = new um\common\Init();
}
return $this->classes['common'];
return $this->classes['um\common\init'];
}
/**
* @since 2.6.8
*
* @return um\frontend\Init
*/
public function frontend() {
if ( empty( $this->classes['um\frontend\init'] ) ) {
$this->classes['um\frontend\init'] = new um\frontend\Init();
}
return $this->classes['um\frontend\init'];
}
/**
* @since 2.0
@@ -776,7 +786,6 @@ if ( ! class_exists( 'UM' ) ) {
new um\core\AJAX_Common();
}
/**
* @since 2.0.30
*/
@@ -791,9 +800,9 @@ if ( ! class_exists( 'UM' ) ) {
/**
* @since 2.0
*
* @return um\admin\Admin()
* @return um\admin\Admin
*/
function admin() {
public function admin() {
if ( empty( $this->classes['admin'] ) ) {
$this->classes['admin'] = new um\admin\Admin();
}