Skip to content

activitypub_post_location

github-actions[bot] edited this page Jan 22, 2026 · 2 revisions

Filter the location Place object for a post.

Auto-generated Example

/**
 * Filter the location Place object for a post.
 *
 * @param array   $place 
 * @param WP_Post $post 
 * @param int     $post_id 
 * @return array|null The filtered Place object or null to disable location.
 */
function my_activitypub_post_location_callback( array $place, WP_Post $post, int $post_id ) {
    // Your code here.
    return $place;
}
add_filter( 'activitypub_post_location', 'my_activitypub_post_location_callback', 10, 3 );

Parameters

  • array $place The Place object.
  • WP_Post $post The post object.
  • int $post_id The post ID.

Returns

array|null The filtered Place object or null to disable location.

Files

\apply_filters( 'activitypub_post_location', $place, $this->item, $post_id )

← All Hooks

Users

Developers

Clone this wiki locally