How would I add the capability in Simple Twitter Connect (in the stc-publish.php file) to not tweet pages, either newly published or edited? I don't need it to be an admin option, just a change for a few of my sites.
It looks like this function would be a good place to add the "don't tweet pages" capabilty (while retaining the check to prevent edited posts from being tweeted) as it checks for edited posts. How can one differentiate between posts and pages?
// this new function prevents edits to existing posts from auto-posting
add_action('transition_post_status','stc_publish_auto_check',10,3);
function stc_publish_auto_check($new, $old, $post) {
if ($new == 'publish' && $old != 'publish') {
$post_types = get_post_types( array('public' => true), 'objects' );
foreach ( $post_types as $post_type ) {
if ( $post->post_type == $post_type->name ) {
stc_publish_automatic($post->ID, $post);
break;
}
}
}
}
Edit 4/03/11
Answer and better edit below.