function ssb_display($content) { $ssb_share_content_position = get_option('ssb_share_content_position'); $ssb_share_content_display = get_option('ssb_share_content_display'); $ssb_share_filter_posttype = get_option('ssb_share_filter_posttype'); if ($ssb_share_filter_posttype == NULL) { $type = 'none'; } else { $type = ''; foreach ($ssb_share_filter_posttype as $post_type => $post_type_value) { $type .= $post_type . ','; } } if (is_singular(explode(',', $type)) or is_home() && ssb_share_home_display() or is_archive() && ssb_share_archive_display()) { $content_new = ''; if ($ssb_share_content_position == 'top') { $content_new .= ssb_share_icons(); $content_new .= $content; } elseif ($ssb_share_content_position == 'bottom') { $content_new .= $content; $content_new .= ssb_share_icons(); } if ($ssb_share_content_display == 'yes') { return $content_new; } else { return $content; } } else { return $content; } }
<div class="row divider-top"> <div class="col-xs-12 text-right"> <a href="#" onclick="jQuery('#share-box-<?php the_ID(); ?> ').slideToggle('fast'); return false;" class="btn btn-default btn-sm"><i class="fa fa-share-alt"></i> compartilhe</a> <?php if (function_exists('ssb_share_icons')) { ?> <div id="share-box-<?php the_ID(); ?> " style="display: none;"> <?php echo ssb_share_icons(); ?> </div> <?php } ?> </div> </div>