- added hook for ignore changing post title in the_title() function if the post is restricted;

This commit is contained in:
Nikita Sinelnikov
2021-08-05 13:55:31 +03:00
parent 2de04584e9
commit a06072563a
+5
View File
@@ -869,6 +869,11 @@ if ( ! class_exists( 'um\core\Access' ) ) {
}
if ( $this->is_restricted( $id ) ) {
$ignore = apply_filters( 'um_ignore_restricted_title', false, $id );
if ( $ignore ) {
return $title;
}
$restricted_global_title = UM()->options()->get( 'restricted_access_post_title' );
$title = stripslashes( $restricted_global_title );
}