Skip to content

Instantly share code, notes, and snippets.

@wpweb101
Last active January 26, 2018 07:25
Show Gist options
  • Select an option

  • Save wpweb101/029a8a986d92456efdd2 to your computer and use it in GitHub Desktop.

Select an option

Save wpweb101/029a8a986d92456efdd2 to your computer and use it in GitHub Desktop.
Social Auto Poster - To remain `Publish Post On` checkbox ticked
<?php
function wpw_auto_poster_checked_social_publishbox( $publish_arr ) {
// Social network title for which you want to remain ticked the 'Publish Post On' checked box
$publish_arr = array(
'facebook',
'twitter',
'linkedin',
'tumblr',
'delicious',
'bufferapp'
);
return $publish_arr;
}
add_filter('wpw_auto_poster_checked_publishbox', 'wpw_auto_poster_checked_social_publishbox' );
function wpw_auto_poster_checked_social_publishbox_meta( $meta ) {
$meta = 'on';
return $meta;
}
add_filter('wpw_auto_poster_checked_publishbox_meta', 'wpw_auto_poster_checked_social_publishbox_meta' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment