示例#1
0
function etheme_recent_comments_shortcode($atts, $content = null)
{
    $a = shortcode_atts(array('title' => '', 'number' => 5), $atts);
    $widget = new Etheme_Recent_Comments_Widget();
    $args = array('before_widget' => '<div class="sidebar-widget etheme_widget_recent_comments">', 'after_widget' => '</div><!-- //sidebar-widget -->', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>', 'widget_id' => 'etheme_widget_recent_comments');
    $instance = array('title' => $a['title'], 'number' => $a['number']);
    ob_start();
    $widget->widget($args, $instance);
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}
示例#2
0
    function etheme_footer_demo($position)
    {
        switch ($position) {
            case 'footer2':
                ?>

                    <div class="row-fluid">
                        <div class="span3">
                            <h4 class="widget-title">About Company</h4>
                            <div>
                                <p>We are a company of highly skilled developers and designers, specialized in working with Magento/Wordpress system management</p>

                                <h6>Contact information</h6>
                                30 South Park Avenue
                                San Francisco, CA 94108
                                Phone: +78 123 456 789
                            </div>

                        </div>
                        <div class="span3">
                            <?php 
                $args = array('widget_id' => 'etheme_widget_recent_comments', 'before_widget' => '<div class="footer-sidebar-widget etheme_widget_recent_comments">', 'after_widget' => '</div><!-- //sidebar-widget -->', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>');
                $instance = array('number' => 2, 'title' => __('Recent Comments', ETHEME_DOMAIN));
                $widget = new Etheme_Recent_Comments_Widget();
                $widget->widget($args, $instance);
                ?>
                        </div>
                        <div class="span3">
                            <?php 
                echo do_shortcode('[vc_wp_posts show_date="1" title="Recent Posts" number="3"]');
                ?>
                        </div>
                        <div class="span3">
                            <?php 
                $args = array('widget_id' => 'etheme_widget_flickr', 'before_widget' => '<div class="footer-sidebar-widget etheme_widget_flickr">', 'after_widget' => '</div><!-- //sidebar-widget -->', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>');
                $instance = array('screen_name' => '52617155@N08', 'number' => 6, 'show_button' => 1, 'title' => __('Flickr Photos', ETHEME_DOMAIN));
                $widget = new Etheme_Flickr_Widget();
                $widget->widget($args, $instance);
                ?>
                        </div>
                    </div>

                <?php 
                break;
            case 'footer9':
                ?>
                    <p><a href="<?php 
                home_url();
                ?>
"><img src="<?php 
                echo PARENT_URL . '/images/';
                ?>
logo-small.png" class="logo-small"></a></p>
                <?php 
                break;
            case 'footer10':
                ?>
                    <p style="line-height: 35px;"><?php 
                _e('Wordpress DEMO Store. All Rights Reserved.', ETHEME_DOMAIN);
                ?>
<p>
                <?php 
                break;
        }
    }