Autoblue has a new autoblue/share_message filter that can be used to modify the message when sharing to Bluesky using PHP.
For example, you could use it to append all post tags as hashtags to the share message:
PHPadd_filter(
'autoblue/share_message',
function ( $message, $post_id ) {
$tags = wp_get_post_tags( $post_id, [ 'fields' => 'names' ] );
if ( ! empty( $tags ) ) {
$tags = array_map( fn( $tag ) => '#' . sanitize_title( $tag ), $tags );
$message .= ' ' . implode( ' ', $tags );
}
return $message;
},
10,
2
);
Improvements (1)
- Add filter for setting a custom share message
Fixes (1)
- Excerpts are now trimmed correctly before being shared