* fix based on commit 7b44add0d7b183fd8f0ddf314e023e1cc035afa2

* fixed allowed query variables
This commit is contained in:
Mykyta Synelnikov
2024-11-11 19:18:42 +02:00
parent 850c0d958e
commit 4bf14b736f
+6 -6
View File
@@ -548,7 +548,6 @@ if ( ! class_exists( 'UM' ) ) {
$this->password();
$this->rewrite();
$this->mail();
$this->rest_api();
$this->shortcodes();
$this->roles();
$this->user();
@@ -565,11 +564,15 @@ if ( ! class_exists( 'UM' ) ) {
$this->blocks();
$this->secure();
//if multisite networks active
// If multisite networks active
if ( is_multisite() ) {
$this->multisite();
}
// Call only when REST_API request
if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
$this->rest_api();
}
}
@@ -1001,14 +1004,12 @@ if ( ! class_exists( 'UM' ) ) {
return $this->classes['config'];
}
/**
* @since 2.0
*
* @return um\core\rest\API_v1|um\core\rest\API_v2
*/
function rest_api() {
public function rest_api() {
$api_version = $this->options()->get( 'rest_api_version' );
if ( empty( $this->classes['rest_api'] ) ) {
@@ -1024,7 +1025,6 @@ if ( ! class_exists( 'UM' ) ) {
return $this->classes['rest_api'];
}
/**
* @since 2.0
*