Skip to content

atmosphere_is_short_form_post

github-actions[bot] edited this page Jul 7, 2026 · 16 revisions

Filters whether the post should be treated as short-form for Bluesky.

Short-form posts publish natively (post body as text, no external embed card). Long-form posts use the teaser composition (title + excerpt + permalink) with an external card linking back to WordPress. The default discriminator mirrors the ActivityPub plugin's Post::get_type() logic — short-form when the post type does not support titles, the post has an empty title, or the post has any non-empty post_format — but additionally treats a post whose body overflows the 300-character native cap as long-form, so a long, titleless link-blog post links back to the original instead of being truncated.

Auto-generated Example

/**
 * Filters whether the post should be treated as short-form for Bluesky.
 * 
 * Short-form posts publish natively (post body as text, no external
 * embed card). Long-form posts use the teaser composition (title +
 * excerpt + permalink) with an external card linking back to
 * WordPress. The default discriminator mirrors the ActivityPub
 * plugin's Post::get_type() logic — short-form when the post type
 * does not support titles, the post has an empty title, or the post
 * has any non-empty post_format — but additionally treats a post
 * whose body overflows the 300-character native cap as long-form, so
 * a long, titleless link-blog post links back to the original
 * instead of being truncated.
 *
 * @param bool    $is_short 
 * @param WP_Post $post 
 * @return bool The filtered value.
 */
function my_atmosphere_is_short_form_post_callback( bool $is_short, WP_Post $post ) {
    // Your code here.
    return $is_short;
}
add_filter( 'atmosphere_is_short_form_post', 'my_atmosphere_is_short_form_post_callback', 10, 2 );

Parameters

  • bool $is_short Whether the post should be treated as short-form.
  • WP_Post $post The post being transformed.

Files

\apply_filters(
				'atmosphere_is_short_form_post',
				$this->is_short_form( $this->object ),
				$this->object
			)

← All Hooks

Clone this wiki locally