-
Notifications
You must be signed in to change notification settings - Fork 83
activitypub_content_visibility
github-actions[bot] edited this page Oct 21, 2025
·
24 revisions
Filters the visibility of a post.
- 'public': Post is public and federated.
- 'quiet_public': Post is public but not federated.
- 'local': Post is only visible locally.
/**
* Filters the visibility of a post.
*
* - 'public': Post is public and federated.
* - 'quiet_public': Post is public but not federated.
* - 'local': Post is only visible locally.
*
* @param string $_visibility
* @param WP_Post $post
* @return string The filtered value.
*/
function my_activitypub_content_visibility_callback( string $_visibility, WP_Post $post ) {
// Your code here.
return $_visibility;
}
add_filter( 'activitypub_content_visibility', 'my_activitypub_content_visibility_callback', 10, 2 );-
string$_visibilityThe visibility of the post. Possible values are: -
WP_Post$postThe post object.
\apply_filters( 'activitypub_content_visibility', $_visibility, $post )Follow @[email protected] for updates and news.