Пример #1
0
 /**
  * Frontend Shortcode Handler
  *
  * @param array $atts array of attributes
  * @param string $content text within enclosing form of shortcode element
  * @param string $shortcodename the shortcode found, when == callback name
  * @return string $output returns the modified html string
  */
 function shortcode_handler($atts, $content = "", $shortcodename = "", $meta = "")
 {
     $atts = shortcode_atts(array('buttons' => "", 'share_facebook' => '', 'share_twitter' => '', 'share_vk' => '', 'share_tumblr' => '', 'share_linkedin' => '', 'share_pinterest' => '', 'share_mail' => '', 'share_gplus' => '', 'share_reddit' => '', 'title' => '', 'style' => ''), $atts, $this->config['shortcode']);
     extract($atts);
     $custom_class = !empty($meta['custom_class']) ? $meta['custom_class'] : "";
     $custom_class .= $meta['el_class'];
     if ($style == 'minimal') {
         $custom_class .= " av-social-sharing-box-minimal";
     }
     $output = '';
     $args = array();
     $options = false;
     $echo = false;
     if ($buttons == "custom") {
         foreach ($atts as &$att) {
             if (empty($att)) {
                 $att = "disabled";
             }
         }
         $options = $atts;
     }
     $output .= "<div class='av-social-sharing-box {$custom_class}'>";
     $output .= avia_social_share_links($args, $options, $title, $echo);
     $output .= "</div>";
     return $output;
 }
Пример #2
0
        echo '</span>';
        echo '</header>';
        // echo the post content
        echo $content_output;
        echo '<footer class="entry-footer">';
        $avia_wp_link_pages_args = apply_filters('avf_wp_link_pages_args', array('before' => '<nav class="pagination_split_post">' . __('Pages:', 'avia_framework'), 'after' => '</nav>', 'pagelink' => '<span>%</span>', 'separator' => ' '));
        wp_link_pages($avia_wp_link_pages_args);
        if (is_single() && !post_password_required()) {
            //tags on single post
            if (has_tag()) {
                echo '<span class="blog-tags minor-meta">';
                the_tags('<strong>' . __('Tags:', 'avia_framework') . '</strong><span> ');
                echo '</span></span>';
            }
            //share links on single post
            avia_social_share_links();
        }
        do_action('ava_after_content', $the_id, 'post');
        echo '</footer>';
        echo "<div class='post_delimiter'></div>";
        echo "</div>";
        echo "<div class='post_author_timeline'></div>";
        echo "</article>";
        $post_loop_count++;
    }
} else {
    ?>

    <article class="entry">
        <header class="entry-content-header">
            <h1 class='post-title entry-title'><?php 
Пример #3
0
function avia_add_social_toolbar_template_builder($content = "")
{
    $content .= '<div id="custom_share_box" class="avia-section main_color container_wrap"><div class="container">';
    $content .= avia_social_share_links(array(), '', '', false);
    $content .= '</div>';
    return $content;
}