- 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:
nikitozzzzzzz
2018-02-18 13:27:46 +02:00
parent 440aa59b28
commit cbf06f5835
14 changed files with 170 additions and 269 deletions
+17 -2
View File
@@ -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'] ) {