function sfc_share_button_automatic($content) { global $post; $post_types = apply_filters('sfc_share_post_types', get_post_types(array('public' => true))); if (!in_array($post->post_type, $post_types)) { return $content; } // exclude bbPress post types if (function_exists('bbp_is_custom_post_type') && bbp_is_custom_post_type()) { return $content; } $options = get_option('sfc_options'); $button = get_sfc_share_button(); switch ($options['share_position']) { case "before": $content = $button . $content; break; case "after": $content = $content . $button; break; case "both": $content = $button . $content . $button; break; case "manual": default: break; } return $content; }
function sfc_share_button_automatic($content) { $options = get_option('sfc_options'); $button = get_sfc_share_button(); switch ($options['share_position']) { case "before": $content = $button . $content; break; case "after": $content = $content . $button; break; case "both": $content = $button . $content . $button; break; case "manual": default: break; } return $content; }