'twitter-follow', 'description' => 'Facebook Like box style fan box for twitter with lot of features'); /* Widget control settings. */ $control_ops = array('width' => 300, 'height' => 350, 'id_base' => 'wp-twitter-follow-widget'); /* Create the widget. */ $this->WP_Widget('wp-twitter-follow-widget', 'WP Twitter Mega Fan Box', $widget_ops, $control_ops); } public function form($instance) { /* Set up some default widget settings. */ $defaults = array( 'title' => 'Twitter Fan Box', ); $instance = wp_parse_args((array) $instance, $defaults); ?>
Go to WP Twitter Mega Fan Box Settings to customize the widget
'; echo ''; } /* After widget (defined by themes). */ echo $after_widget; } } /* Add our function to the widgets_init hook. */ add_action('widgets_init', 'twitter_load_widget'); /* Function that registers our widget. */ function twitter_load_widget() { register_widget('WP_Twitter_Mega_Fan_Box'); } add_action('init', 'initialize_script'); function initialize_script() { wp_enqueue_script('jquery'); wp_register_script('twitter-follow-widget', plugins_url('followbox/jquery.followbox.js', __FILE__)); wp_enqueue_script('twitter-follow-widget', array('jquery')); wp_register_script('twitter-follow-color-picker', plugins_url('color-picker/js/colorpicker.js', __FILE__)); wp_enqueue_script('twitter-follow-color-picker', array('jquery')); wp_register_script('twitter-follow-color-picker-eye', plugins_url('color-picker/js/colorpicker.js', __FILE__)); wp_enqueue_script('twitter-follow-color-picker-eye', array('twitter-follow-color-picker')); wp_register_script('twitter-follow-color-picker-utils', plugins_url('color-picker/js/colorpicker.js', __FILE__)); wp_enqueue_script('twitter-follow-color-picker-utils', array('twitter-follow-color-picker-eye')); wp_register_script('twitter-follow-color-picker-layout', plugins_url('color-picker/js/colorpicker.js', __FILE__)); wp_enqueue_script('twitter-follow-color-picker-layout', array('twitter-follow-color-picker-utils')); wp_register_style('twitter-follow-widget-style', plugins_url('followbox/followbox.css', __FILE__)); wp_enqueue_style('twitter-follow-widget-style'); wp_register_style('twitter-follow-color-style', plugins_url('color-picker/css/colorpicker.css', __FILE__)); wp_enqueue_style('twitter-follow-color-style'); } ?>