I don’t know exactly what you mean by broadcasting the subtitle to another plugin, but if you can share the subtitle you should be able to wrap it in conditional logic to check if it exists first.
You might also be able to run something on save_post
to save a value if none exists. I don’t really like this as it saves a bunch of default texts to the database, but it might do the trick, and is the best I can do.
/**
* Save a default Subtitle if none exists
*
* @param int $post_id the ID of the post we're saving
* @return int
*/
function kia_save_default_subtitle( $post_id ) {
$subtitle = get_post_meta( $post_id, 'kia_subtitle', true );
if ( $ subtitle ) {
$default = esc_html__( 'A default subtitle', 'your-textdomain' );
update_post_meta( $post_id, 'kia_subtitle', $default );
}
}
add_action( 'save_post', 'kia_save_default_subtitle', 20 );
`