wp/wp-content/themes/IN-MOTION-package-u1/in-motion/functions/widget-twitter.php
changeset 16 a86126ab1dd4
parent 0 d970ebf37754
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
     9 class twitter_widget extends WP_Widget {
     9 class twitter_widget extends WP_Widget {
    10 /*-----------------------------------------------------------------------------------*/
    10 /*-----------------------------------------------------------------------------------*/
    11 /*	Widget Setup
    11 /*	Widget Setup
    12 /*-----------------------------------------------------------------------------------*/
    12 /*-----------------------------------------------------------------------------------*/
    13 	
    13 	
    14 function twitter_Widget() {
    14 function __construct() {
    15 	$widget_options = array(
    15 	$widget_options = array(
    16 		'classname' => 'twitter_widget',
    16 		'classname' => 'twitter_widget',
    17 		'description' => __('Custom twitter widget.','pego_tr')
    17 		'description' => __('Custom twitter widget.','pego_tr')
    18 	);
    18 	);
    19 		
    19 		
    20 	$control_options = array(    //dodama svoje incializirane mere
    20 	$control_options = array(    //dodama svoje incializirane mere
    21 		'width' => 200,
    21 		'width' => 200,
    22 		'height' => 400,
    22 		'height' => 400,
    23 		'id_base' => 'twitter_widget'
    23 		'id_base' => 'twitter_widget'
    24 	);
    24 	);
    25 	$this->WP_Widget( 'twitter_widget', __('Twitter Widget','pego_tr'), $widget_options, $control_options );	
    25 	parent::__construct( 'twitter_widget', __('Twitter Widget','pego_tr'), $widget_options, $control_options );	
    26 }
    26 }
    27 function widget( $args, $instance ) {
    27 function widget( $args, $instance ) {
    28 	
    28 	
    29 	extract( $args );
    29 	extract( $args );
    30 	$title = apply_filters('widget_title', $instance['title'] );
    30 	$title = apply_filters('widget_title', $instance['title'] );