mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- avoid restriction for the post author;
This commit is contained in:
@@ -946,6 +946,11 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
|
||||
$original_post = $post;
|
||||
|
||||
if ( is_user_logged_in() && isset( $post->post_author ) && $post->post_author == get_current_user_id() ) {
|
||||
$filtered_posts[] = $post;
|
||||
continue;
|
||||
}
|
||||
|
||||
//Woocommerce AJAX fixes....remove filtration on wc-ajax which goes to Front Page
|
||||
if ( ! empty( $_GET['wc-ajax'] ) && defined( 'WC_DOING_AJAX' ) && WC_DOING_AJAX ) {
|
||||
$filtered_posts[] = $post;
|
||||
@@ -1643,6 +1648,12 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$post = get_post( $post_id );
|
||||
if ( is_user_logged_in() && isset( $post->post_author ) && $post->post_author == get_current_user_id() ) {
|
||||
$cache[ $post_id ] = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
$restricted = true;
|
||||
|
||||
$restriction = $this->get_post_privacy_settings( $post_id );
|
||||
|
||||
Reference in New Issue
Block a user