-
Notifications
You must be signed in to change notification settings - Fork 1
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.
/**
* 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 );-
bool$is_shortWhether the post should be treated as short-form. -
WP_Post$postThe post being transformed.
\apply_filters(
'atmosphere_is_short_form_post',
$this->is_short_form( $this->object ),
$this->object
)