Plugin Directory

Changeset 803576


Ignore:
Timestamp:
11/13/2013 07:43:43 AM (12 years ago)
Author:
sudeep611
Message:

New updated with latest function calls to Deprecated calls

Location:
beautiful-social-widget/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • beautiful-social-widget/trunk/beautiful-social-widget.php

    r801550 r803576  
    22/*
    33Plugin Name: Beautiful Social Widget
    4 Plugin URI: http://cwlk.org/beautiful-social-widget
     4Plugin URI: http://cwlk.org/beautiful-social-widget/
    55Description: This plugin provides the widget to show the link to your Social profile and make your Website more Social.
    6 Version: 1.2
     6Version: 1.3
    77Author: Sudeep Acharya
    88Author URI: http://cwlk.org
     
    1515function bsw_widget()
    1616{
    17     register_widget('beautiful_social_widget');
     17    register_widget('beautiful_social_widget');
    1818}
    1919
     
    2121class beautiful_social_widget extends WP_Widget {
    2222
    23     function beautiful_social_widget() {
    24         $widget_ops = array('classname' => 'widget_beautiful_social_widget', 'description' => __('Displays the link to your Social profile with icon.') );
     23    function beautiful_social_widget() {
     24        $widget_ops = array('classname' => 'widget_beautiful_social_widget', 'description' => __('Displays the link to your Social profile with icon.') );
    2525        $this->WP_Widget('beautiful_social_widget', __('Beautiful Social Widget'), $widget_ops);
    26     }
     26    }
    2727    function form($instance) {
    2828        $instance = wp_parse_args( (array) $instance, array( 'title' => '', 'facebook' => '', 'twitter' => '', 'googleplus' => '', 'linkedin' => '', 'pinterest' => '',
    2929         'youtube' => '', 'instagram' => '', 'tumblr' => '', 'flickr' => '', 'rssfeed' => '', 'email' => '') );
    30         $title = strip_tags($instance['title']);
    31         $facebook = strip_tags($instance['facebook']);
    32         $twitter = strip_tags($instance['twitter']);
    33         $googleplus = strip_tags($instance['googleplus']);
    34         $linkedin = strip_tags($instance['linkedin']);
    35         $pinterest = strip_tags($instance['pinterest']);
     30        $title = strip_tags($instance['title']);
     31        $facebook = strip_tags($instance['facebook']);
     32        $twitter = strip_tags($instance['twitter']);
     33        $googleplus = strip_tags($instance['googleplus']);
     34        $linkedin = strip_tags($instance['linkedin']);
     35        $pinterest = strip_tags($instance['pinterest']);
    3636        $youtube = strip_tags($instance['youtube']);
    3737        $instagram = strip_tags($instance['instagram']);
     
    4141        $email = strip_tags($instance['email']);
    4242
    43         ?>
    44         <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php echo __('Title'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo attribute_escape($title); ?>" /></label></p>
    45         <p><label for="<?php echo $this->get_field_id('facebook'); ?>"><?php echo __('Facebook'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('facebook'); ?>" name="<?php echo $this->get_field_name('facebook'); ?>" type="text" value="<?php echo attribute_escape($facebook); ?>" /></label></p>
    46         <p><label for="<?php echo $this->get_field_id('twitter'); ?>"><?php echo __('Twitter'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('twitter'); ?>" name="<?php echo $this->get_field_name('twitter'); ?>" type="text" value="<?php echo attribute_escape($twitter); ?>" /></label></p>
    47         <p><label for="<?php echo $this->get_field_id('googleplus'); ?>"><?php echo __('Google Plus'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('googleplus'); ?>" name="<?php echo $this->get_field_name('googleplus'); ?>" type="text" value="<?php echo attribute_escape($googleplus); ?>" /></label></p>
    48         <p><label for="<?php echo $this->get_field_id('linkedin'); ?>"><?php echo __('Linked In'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('linkedin'); ?>" name="<?php echo $this->get_field_name('linkedin'); ?>" type="text" value="<?php echo attribute_escape($linkedin); ?>" /></label></p>
    49         <p><label for="<?php echo $this->get_field_id('pinterest'); ?>"><?php echo __('Pinterest'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('pinterest'); ?>" name="<?php echo $this->get_field_name('pinterest'); ?>" type="text" value="<?php echo attribute_escape($pinterest); ?>" /></label></p>
    50         <p><label for="<?php echo $this->get_field_id('youtube'); ?>"><?php echo __('YouTube'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('youtube'); ?>" name="<?php echo $this->get_field_name('youtube'); ?>" type="text" value="<?php echo attribute_escape($youtube); ?>" /></label></p>
    51         <p><label for="<?php echo $this->get_field_id('instagram'); ?>"><?php echo __('Instagram'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('instagram'); ?>" name="<?php echo $this->get_field_name('instagram'); ?>" type="text" value="<?php echo attribute_escape($instagram); ?>" /></label></p>
    52         <p><label for="<?php echo $this->get_field_id('tumblr'); ?>"><?php echo __('Tumblr'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('tumblr'); ?>" name="<?php echo $this->get_field_name('tumblr'); ?>" type="text" value="<?php echo attribute_escape($tumblr); ?>" /></label></p>
    53         <p><label for="<?php echo $this->get_field_id('flickr'); ?>"><?php echo __('Flickr'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('flickr'); ?>" name="<?php echo $this->get_field_name('flickr'); ?>" type="text" value="<?php echo attribute_escape($flickr); ?>" /></label></p>
    54         <p><label for="<?php echo $this->get_field_id('rssfeed'); ?>"><?php echo __('RSS Feed'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('rssfeed'); ?>" name="<?php echo $this->get_field_name('rssfeed'); ?>" type="text" value="<?php echo attribute_escape($rssfeed); ?>" /></label></p>
    55         <p><label for="<?php echo $this->get_field_id('email'); ?>"><?php echo __('Email Address'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('email'); ?>" name="<?php echo $this->get_field_name('email'); ?>" type="text" value="<?php echo attribute_escape($email); ?>" /></label></p>       
     43        ?>
     44        <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php echo __('Title'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p>
     45        <p><label for="<?php echo $this->get_field_id('facebook'); ?>"><?php echo __('Facebook'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('facebook'); ?>" name="<?php echo $this->get_field_name('facebook'); ?>" type="text" value="<?php echo esc_attr($facebook); ?>" /></label></p>
     46        <p><label for="<?php echo $this->get_field_id('twitter'); ?>"><?php echo __('Twitter'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('twitter'); ?>" name="<?php echo $this->get_field_name('twitter'); ?>" type="text" value="<?php echo esc_attr($twitter); ?>" /></label></p>
     47        <p><label for="<?php echo $this->get_field_id('googleplus'); ?>"><?php echo __('Google Plus'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('googleplus'); ?>" name="<?php echo $this->get_field_name('googleplus'); ?>" type="text" value="<?php echo esc_attr($googleplus); ?>" /></label></p>
     48        <p><label for="<?php echo $this->get_field_id('linkedin'); ?>"><?php echo __('Linked In'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('linkedin'); ?>" name="<?php echo $this->get_field_name('linkedin'); ?>" type="text" value="<?php echo esc_attr($linkedin); ?>" /></label></p>
     49        <p><label for="<?php echo $this->get_field_id('pinterest'); ?>"><?php echo __('Pinterest'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('pinterest'); ?>" name="<?php echo $this->get_field_name('pinterest'); ?>" type="text" value="<?php echo esc_attr($pinterest); ?>" /></label></p>
     50        <p><label for="<?php echo $this->get_field_id('youtube'); ?>"><?php echo __('YouTube'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('youtube'); ?>" name="<?php echo $this->get_field_name('youtube'); ?>" type="text" value="<?php echo esc_attr($youtube); ?>" /></label></p>
     51        <p><label for="<?php echo $this->get_field_id('instagram'); ?>"><?php echo __('Instagram'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('instagram'); ?>" name="<?php echo $this->get_field_name('instagram'); ?>" type="text" value="<?php echo esc_attr($instagram); ?>" /></label></p>
     52        <p><label for="<?php echo $this->get_field_id('tumblr'); ?>"><?php echo __('Tumblr'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('tumblr'); ?>" name="<?php echo $this->get_field_name('tumblr'); ?>" type="text" value="<?php echo esc_attr($tumblr); ?>" /></label></p>
     53        <p><label for="<?php echo $this->get_field_id('flickr'); ?>"><?php echo __('Flickr'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('flickr'); ?>" name="<?php echo $this->get_field_name('flickr'); ?>" type="text" value="<?php echo esc_attr($flickr); ?>" /></label></p>
     54        <p><label for="<?php echo $this->get_field_id('rssfeed'); ?>"><?php echo __('RSS Feed'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('rssfeed'); ?>" name="<?php echo $this->get_field_name('rssfeed'); ?>" type="text" value="<?php echo esc_attr($rssfeed); ?>" /></label></p>
     55        <p><label for="<?php echo $this->get_field_id('email'); ?>"><?php echo __('Email Address'); ?>: <input class="widefat" id="<?php echo $this->get_field_id('email'); ?>" name="<?php echo $this->get_field_name('email'); ?>" type="text" value="<?php echo esc_attr($email); ?>" /></label></p>       
    5656
    5757        <?php
     
    6060    function update($new_instance, $old_instance) {
    6161        $instance = $old_instance;
    62         $instance['title'] = strip_tags($new_instance['title']);
    63         $instance['facebook'] = strip_tags($new_instance['facebook']);
    64         $instance['twitter'] = strip_tags($new_instance['twitter']);
    65         $instance['googleplus'] = strip_tags($new_instance['googleplus']);
    66         $instance['linkedin'] = strip_tags($new_instance['linkedin']);
    67         $instance['pinterest'] = strip_tags($new_instance['pinterest']);
     62        $instance['title'] = strip_tags($new_instance['title']);
     63        $instance['facebook'] = strip_tags($new_instance['facebook']);
     64        $instance['twitter'] = strip_tags($new_instance['twitter']);
     65        $instance['googleplus'] = strip_tags($new_instance['googleplus']);
     66        $instance['linkedin'] = strip_tags($new_instance['linkedin']);
     67        $instance['pinterest'] = strip_tags($new_instance['pinterest']);
    6868        $instance['youtube'] = strip_tags($new_instance['youtube']);
    6969        $instance['instagram'] = strip_tags($new_instance['instagram']);
     
    7272        $instance['rssfeed'] = strip_tags($new_instance['rssfeed']);
    7373        $instance['email'] = strip_tags($new_instance['email']);
    74        
     74       
    7575        return $instance;
    7676    }
     
    7979        extract($args);
    8080 
    81         $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
    82         $facebook = empty($instance['facebook']) ? '' : $instance['facebook'];
    83         $twitter = empty($instance['twitter']) ? '' : $instance['twitter'];
    84         $googleplus = empty($instance['googleplus']) ? '' : $instance['googleplus'];
    85         $linkedin = empty($instance['linkedin']) ? '' : $instance['linkedin'];
    86         $pinterest = empty($instance['pinterest']) ? '' : $instance['pinterest'];
     81        $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);
     82        $facebook = empty($instance['facebook']) ? '' : $instance['facebook'];
     83        $twitter = empty($instance['twitter']) ? '' : $instance['twitter'];
     84        $googleplus = empty($instance['googleplus']) ? '' : $instance['googleplus'];
     85        $linkedin = empty($instance['linkedin']) ? '' : $instance['linkedin'];
     86        $pinterest = empty($instance['pinterest']) ? '' : $instance['pinterest'];
    8787        $youtube = empty($instance['youtube']) ? '' : $instance['youtube'];
    8888        $instagram = empty($instance['instagram']) ? '' : $instance['instagram'];
     
    9393       
    9494
    95         echo $before_widget;
    96         if (!empty( $title )) {
    97             echo $before_title . $title . $after_title;
    98         };
     95        echo $before_widget;
     96        if (!empty( $title )) {
     97            echo $before_title . $title . $after_title;
     98        };
    9999
    100        
     100       
    101101        echo '<div id="bsw-content">';
    102102        if( $facebook ) echo '<a href="'. $facebook .'" target="_blank" id="bswfacebook" title="Facebook">Facebook</a>';
    103         if( $twitter ) echo '<a id="bswtwitter" href="'. $twitter .'" target="_blank" title="Twitter">Twitter</a>';
    104         if( $googleplus ) echo '<a id="bswgoogleplus" href="'. $googleplus .'" target="_blank" title="Google Plus">Google Plus</a>';
    105         if( $linkedin ) echo '<a id="bswlinkedin" href="'. $linkedin .'" target="_blank" title="Linked In">Linked In</a>';
    106         if( $pinterest ) echo '<a id="bswpinterest" href="'. $pinterest .'" target="_blank" title="Pinterest">Pinterest</a>';
     103        if( $twitter ) echo '<a id="bswtwitter" href="'. $twitter .'" target="_blank" title="Twitter">Twitter</a>';
     104        if( $googleplus ) echo '<a id="bswgoogleplus" href="'. $googleplus .'" target="_blank" title="Google Plus">Google Plus</a>';
     105        if( $linkedin ) echo '<a id="bswlinkedin" href="'. $linkedin .'" target="_blank" title="Linked In">Linked In</a>';
     106        if( $pinterest ) echo '<a id="bswpinterest" href="'. $pinterest .'" target="_blank" title="Pinterest">Pinterest</a>';
    107107        if( $youtube ) echo '<a id="bswyoutube" href="'. $youtube .'" target="_blank" title="YouTube">YouTube</a>';
    108108        if( $instagram ) echo '<a id="bswinstagram" href="'. $instagram .'" target="_blank" title="Instagram">Instagram</a>';
     
    111111        if( $rssfeed ) echo '<a id="bswrssfeed" href="'. $rssfeed .'" target="_blank" title="RSS Feed">RSS Feed</a>';
    112112        if( $email ) echo '<a id="bswemail" href="mailto:'. $email .'" target="_blank" title="Email">Email</a>';
    113         echo '</div>';
     113        echo '</div>';
    114114       
    115115        echo $after_widget;
    116116        wp_enqueue_style( 'bsw', plugins_url('bsw.css', __FILE__) );
    117     }
     117    }
    118118}
    119119?>
  • beautiful-social-widget/trunk/readme.txt

    r801550 r803576  
    1616
    1717This Plugin supports the following Social Media:
    18 * Facebook
    19 * Twitter
    20 * Google Plus
    21 * Linked In
    22 * Pinterest
    23 * YouTube
    24 * Instagram
    25 * Tumblr
    26 * Flickr
    27 * Rss
    28 * Email
     18*   Facebook
     19*   Twitter
     20*   Google Plus
     21*   Linked In
     22*   Pinterest
     23*   YouTube
     24*   Instagram
     25*   Tumblr
     26*   Flickr
     27*   Rss
     28*   Email
    2929
    3030== Installation ==
     
    4444== Changelog ==
    4545
     46= 1.3 =
     47*   Replaced Deprecated functions
     48
    4649= 1.2 =
    47 * Added Email option
     50*   Added Email option
    4851
    4952= 1.1 =
    50 * Update License
     53*   Update License
    5154
    5255= 1.0 =
    53 * Initial reelase
     56*   Initial reelase
Note: See TracChangeset for help on using the changeset viewer.