apply_filters( 'um_access_restricted_post_instance', $filtered_post, $post, $query ) → {object}
Filters restricted via Ultimate Member settings post instance.
Parameters:
Name | Type | Description |
---|---|---|
$filtered_post |
object | Restricted |
$post |
object | Base |
$query |
object |
|
- Since:
- 2.8.2
- Source:
Returns:
Restricted WP_Post
instance.
- Type
- object
Example
function restricted_post_instance( $filtered_post, $original_post, $query ) {
// your code here
$filtered_post->post_title = 'This post is restricted';
return $filtered_post;
}
add_filter( 'um_access_restricted_post_instance', 'restricted_post_instance', 10, 3 );