mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- fixed bbPress restrict content message on forums;
- fixed issues with permalinks (issue #375); - fixed replacing placeholders in [show_content_for_role] shortcode;
This commit is contained in:
@@ -522,6 +522,11 @@ if ( ! class_exists( 'Access' ) ) {
|
||||
$post->post_content = ! empty( $restriction['_um_restrict_custom_message'] ) ? stripslashes( $restriction['_um_restrict_custom_message'] ) : '';
|
||||
}
|
||||
|
||||
$this->current_single_post = $post;
|
||||
add_filter( 'the_content', array( &$this, 'replace_post_content' ), 9999, 1 );
|
||||
|
||||
do_action( 'um_access_fix_external_post_content' );
|
||||
|
||||
$filtered_posts[] = $post;
|
||||
continue;
|
||||
} elseif ( '1' == $restriction['_um_noaccess_action'] ) {
|
||||
@@ -613,6 +618,8 @@ if ( ! class_exists( 'Access' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
do_action( 'um_access_fix_external_post_content' );
|
||||
|
||||
$filtered_posts[] = $post;
|
||||
continue;
|
||||
} elseif ( '1' == $restriction['_um_noaccess_action'] ) {
|
||||
@@ -663,17 +670,25 @@ if ( ! class_exists( 'Access' ) ) {
|
||||
if ( ! isset( $restriction['_um_restrict_by_custom_message'] ) || '0' == $restriction['_um_restrict_by_custom_message'] ) {
|
||||
$post->post_content = stripslashes( $restricted_global_message );
|
||||
|
||||
if ( 'attachment' == $post->post_type ) {
|
||||
$this->current_single_post = $post;
|
||||
add_filter( 'the_content', array( &$this, 'replace_post_content' ), 9999, 1 );
|
||||
|
||||
if ( 'attachment' == $post->post_type ) {
|
||||
remove_filter( 'the_content', 'prepend_attachment' );
|
||||
}
|
||||
} elseif ( '1' == $restriction['_um_restrict_by_custom_message'] ) {
|
||||
$post->post_content = ! empty( $restriction['_um_restrict_custom_message'] ) ? stripslashes( $restriction['_um_restrict_custom_message'] ) : '';
|
||||
|
||||
if ( 'attachment' == $post->post_type ) {
|
||||
$this->current_single_post = $post;
|
||||
add_filter( 'the_content', array( &$this, 'replace_post_content' ), 9999, 1 );
|
||||
|
||||
if ( 'attachment' == $post->post_type ) {
|
||||
remove_filter( 'the_content', 'prepend_attachment' );
|
||||
}
|
||||
}
|
||||
|
||||
do_action( 'um_access_fix_external_post_content' );
|
||||
|
||||
$filtered_posts[] = $post;
|
||||
continue;
|
||||
} elseif ( '1' == $restriction['_um_noaccess_action'] ) {
|
||||
|
||||
Reference in New Issue
Block a user