mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 06:33:50 +09:00
Merge pull request #1291 from ultimatemember/fix/rest_request_pages
REST API endpoint List Pages redirecting to the homepage
This commit is contained in:
@@ -1374,6 +1374,11 @@ function um_pre_profile_shortcode( $args ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// disable for the REST API requests.
|
||||
if ( defined( 'REST_REQUEST' ) && REST_REQUEST ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( true === UM()->fields()->editing ) {
|
||||
if ( um_get_requested_user() ) {
|
||||
if ( ! UM()->roles()->um_current_user_can( 'edit', um_get_requested_user() ) ) {
|
||||
|
||||
Reference in New Issue
Block a user