function sfc_publish_auto_check($new, $old, $post) { if ($new == 'publish' && $old != 'publish') { $post_types = apply_filters('sfc_publish_post_types', get_post_types(array('public' => true), 'objects')); foreach ($post_types as $post_type) { if ($post->post_type == $post_type->name) { sfc_publish_automatic($post->ID, $post); break; } } } }
function sfc_publish_auto_check($new, $old, $post) { if ($new == 'publish' && $old != 'publish') { sfc_publish_automatic($post->ID, $post); } }