Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Social WordPress Plugin "status broadcast" customization
// set format for status posts to exclude title
// if status post is short enough, do not include URL either
function akv3_social_broadcast_format($format, $post, $service) {
if (get_post_format($post) == 'status') {
$format = (strlen($post->post_content) <= $service->max_broadcast_length() ? '{content}' : '{content} {url}');
return $format;
add_filter('social_broadcast_format', 'akv3_social_broadcast_format', 10, 3);
// remove URL in comments if comment is short enough to be included
function akv3_social_comment_broadcast_format($format, $comment, $service) {
return (strlen($comment->comment_content) <= $service->max_broadcast_length() ? '{content}' : '{content} {url}');
add_filter('social_comment_broadcast_format', 'akv3_social_comment_broadcast_format', 10, 3);
// broadcast status posts by default
function akv3_social_default_broadcast_on_status_format() {
<script type="text/javascript">
(function($) {
$('#publish').click(function() {
if ($('#post-format-status:checked').size()) {
$('#social_notify_yes').prop('checked', true);
add_action('dbx_post_sidebar', 'akv3_social_default_broadcast_on_status_format');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.