Skip to content

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.

Auto-generated Example

/**
 * 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 );

Parameters

  • string $_visibility The visibility of the post. Possible values are:
  • WP_Post $post The post object.

Files

\apply_filters( 'activitypub_content_visibility', $_visibility, $post )

← All Hooks

Users

Developers

Clone this wiki locally