mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- remove wpautop filter at UM pages;
This commit is contained in:
@@ -23,6 +23,7 @@ if ( ! class_exists( 'Shortcodes' ) ) {
|
||||
|
||||
|
||||
add_filter( 'body_class', array( &$this, 'body_class' ), 0 );
|
||||
add_action( 'template_redirect', array( &$this, 'is_um_page' ) );
|
||||
|
||||
add_filter( 'um_shortcode_args_filter', array( &$this, 'display_logout_form' ), 99 );
|
||||
add_filter( 'um_shortcode_args_filter', array( &$this, 'parse_shortcode_args' ), 99 );
|
||||
@@ -176,6 +177,17 @@ if ( ! class_exists( 'Shortcodes' ) ) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove wpautop filter for post content if it's UM core page
|
||||
*/
|
||||
function is_um_page() {
|
||||
if ( is_ultimatemember() ) {
|
||||
remove_filter( 'the_content', 'wpautop' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/***
|
||||
*** @extend body classes
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user