Пример #1
0
    function widget($args, $instance)
    {
        extract($args);
        $title = $instance['title'];
        $limit = $instance['limit'];
        if (!$limit) {
            $limit = 5;
        }
        $username = $instance['username'];
        $unique_id = $args['widget_id'];
        ?>
		<?php 
        echo $before_widget;
        ?>
        <?php 
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
        <ul id="twitter_update_list_<?php 
        echo $unique_id;
        ?>
"><li></li></ul>	
        <?php 
        echo woo_twitter_script($unique_id, $username, $limit);
        //Javascript output function
        ?>
	 
        <?php 
        echo $after_widget;
        ?>
        
   		
	<?php 
    }
    function widget($args, $instance)
    {
        extract($args);
        $title = $instance['title'];
        $limit = $instance['limit'];
        if (!$limit) {
            $limit = 5;
        }
        $username = $instance['username'];
        $unique_id = $args['widget_id'];
        ?>

		<?php 
        echo $before_widget;
        ?>

        <?php 
        if ($title) {
            echo $before_title . $title . $after_title;
        } else {
            ?>

        <h3 class="tlogo"><img src="<?php 
            bloginfo('template_directory');
            ?>
/images/twitter.png" /></h3>
		<?php 
        }
        ?>
        
        <div class="back"><ul id="twitter_update_list_<?php 
        echo $unique_id;
        ?>
"><li></li></ul>
        <p><?php 
        _e('Follow', 'woothemes');
        ?>
 <a href="http://twitter.com/<?php 
        echo $username;
        ?>
"><strong>@<?php 
        echo $username;
        ?>
</strong></a> <?php 
        _e('on Twitter', 'woothemes');
        ?>
</p></div><div class="clear"></div>
        <?php 
        echo woo_twitter_script($unique_id, $username, $limit);
        //Javascript output function
        ?>
	 
        <?php 
        echo $after_widget;
        ?>

        
   		
	<?php 
    }
 function widget($args, $instance)
 {
     $html = '';
     extract($args, EXTR_SKIP);
     /* Our variables from the widget settings. */
     $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
     $limit = $instance['limit'];
     if (!intval($limit)) {
         $limit = 5;
     }
     $username = $instance['username'];
     $unique_id = $args['widget_id'];
     /* If we don't have a username, don't display the widget. */
     if ($username != '') {
         /* Before widget (defined by themes). */
         echo $before_widget;
         /* Replace the title with a Twitter image, if one exists and no title is set. */
         if (!$title && file_exists(get_template_directory() . '/images/twitter.png')) {
             $title = '<img src="' . get_template_directory_uri() . '/images/twitter.png" alt="' . __('Recent Tweets', 'woothemes') . '" />' . __(' Twitter', 'woothemes') . "\n";
         }
         /* Display the widget title if one was input (before and after defined by themes). */
         if ($title) {
             echo $before_title . $title . $after_title;
         }
         // End IF Statement
         /* Widget content. */
         // Add actions for plugins/themes to hook onto.
         do_action('woo_widget_twitter_top');
         $html = '';
         $html .= '<div class="back">' . "\n";
         $html .= '<ul id="twitter_update_list_' . $unique_id . '">' . "\n";
         $html .= '<li></li>' . "\n";
         $html .= '</ul>' . "\n";
         $html .= '<p>' . __('Follow', 'woothemes') . ' <a href="http' . (is_ssl() ? 's' : '') . '://twitter.com/' . $username . '"><strong>@' . $username . '</strong></a> ' . __('on Twitter', 'woothemes') . '</p>' . "\n";
         $html .= '</div>' . "\n";
         $html .= '<div class="clear"></div>' . "\n";
         echo $html;
         echo woo_twitter_script($unique_id, $username, $limit);
         //Javascript output function
         // Add actions for plugins/themes to hook onto.
         do_action('woo_widget_twitter_bottom');
         /* After widget (defined by themes). */
         echo $after_widget;
     }
     // End IF Statement
 }
    function widget($args, $instance)
    {
        extract($args, EXTR_SKIP);
        $instance = $this->woo_enforce_defaults($instance);
        extract($instance, EXTR_SKIP);
        $unique_id = $args['widget_id'];
        echo $before_widget;
        if ($title) {
            echo $before_title . apply_filters('widget_title', $title, $instance, $this->id_base) . $after_title;
        } else {
            ?>
<h3 class="tlogo"><img src="<?php 
            bloginfo('template_directory');
            ?>
/images/twitter.png" alt="Twitter" /><?php 
            _e('Twitter', 'woothemes');
            ?>
</h3><?php 
        }
        ?>
<div class="back"><ul id="twitter_update_list_<?php 
        echo $unique_id;
        ?>
"><li></li></ul>
			<p><?php 
        _e('Follow', 'woothemes');
        ?>
 <a href="http<?php 
        is_ssl() ? 's' : '';
        ?>
://twitter.com/<?php 
        echo $username;
        ?>
"><strong>@<?php 
        echo $username;
        ?>
</strong></a> <?php 
        _e('on Twitter', 'woothemes');
        ?>
</p></div><div class="clear"></div><?php 
        echo woo_twitter_script($unique_id, $username, $limit);
        //Javascript output function
        echo $after_widget;
    }
Пример #5
0
						    	<div class="contact-social<?php 
            if (isset($woo_options['woo_contact_panel']) && $woo_options['woo_contact_panel'] == 'true' && (isset($woo_options['woo_contact_twitter']) && $woo_options['woo_contact_twitter'] != '' || isset($woo_options['woo_contact_subscribe_and_connect']) && $woo_options['woo_contact_subscribe_and_connect'] == 'true')) {
                ?>
 col-right<?php 
            }
            ?>
">
						    	
						    		<?php 
            if (isset($woo_options['woo_contact_twitter']) && $woo_options['woo_contact_twitter'] != '') {
                ?>
						    		<section id="twitter">
						    			<h3>Twitter</h3>
						    			<ul id="twitter_update_list_123"><li></li></ul>
						    			<?php 
                echo woo_twitter_script(123, $woo_options['woo_contact_twitter'], 1);
                ?>
						    		</section>
						    		<?php 
            }
            ?>
						    		<?php 
            if (isset($woo_options['woo_contact_subscribe_and_connect']) && $woo_options['woo_contact_subscribe_and_connect'] == 'true') {
                woo_subscribe_connect();
            }
            ?>
			    		
						    	
						    	</div>
						    	
						    	</div><!-- /.location-twitter -->
Пример #6
0
function smpl_tweet()
{
    $twitterID = get_option('woo_contact_twitter');
    ?>
	<div class="tweet" id="twitter_header">
		<ul id="twitter_update_list_header"><li></li></ul>
		<?php 
    echo woo_twitter_script('header', $twitterID, 1);
    ?>
	</div>
<?php 
}