WordPress.org

Plugin Directory

Changeset 1194555


Ignore:
Timestamp:
07/08/15 05:13:10 (19 months ago)
Author:
SriniG
Message:

v1.0.1: updating to PHP5 style constructor

Location:
subscribe-connect-follow-widget/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • subscribe-connect-follow-widget/trunk/readme.txt

    r1144624 r1194555  
    44Tags: widget, subscribe, connect, follow, buttons, icons, image links, feed, rss, rss-feed, email, feedburner, twitter, facebook, behance, blogger, delicious, diaspora, digg, deviant-art, flickr, foursquare, friendfeed, google, google plus, identica, lastfm, linkedin, myspace, picasa, pinterest, podcast, posterous, reddit, skype, slashdot, soundcloud, stumbleupon, technorati, tumblr, vimeo, xing, youtube 
    55Requires at least: 2.8 
    6 Tested up to: 4.2 
     6Tested up to: 4.2.2 
    77Stable tag: trunk 
    88License: GNU General Public License 
     
    133133 
    134134== Changelog == 
     135 
     136= 1.0.1 (2015-07-08) = 
     137* Updating to PHP5 style constructor 
     138 
    135139= 1.0 (2015-04-24) = 
    136140* Added: Behance, Email, Foursquare, Skype 
     
    172176== Upgrade Notice == 
    173177 
    174 = 1.0 = 
    175 Behance, Email, Foursquare and Skype added. New widget option field to specify the number of items. Other fixes and improvements. Upgrade recommended. 
     178= 1.0.1 = 
     179v1.0 adds Behance, Email, Foursquare and Skype + new widget option field to specify the number of items + other fixes and improvements. v1.0.1 updates to PHP5 style constructor. 
  • subscribe-connect-follow-widget/trunk/subscribe-connect-follow-widget.php

    r1144624 r1194555  
    44 * Plugin URI: http://srinig.com/wordpress/plugins/subscribe-connect-follow-widget/ 
    55 * Description: A widget to display image links (icon buttons) to subscription services and social networking sites. 
    6  * Version: 1.0 
     6 * Version: 1.0.1 
    77 * Author: Srini G 
    88 * Author URI: http://srinig.com/wordpress/ 
     
    1010 */ 
    1111 
    12  
    13 add_action( 'widgets_init', 'scfw_load_widgets' ); 
    14  
    15 function scfw_load_widgets() { 
    16     register_widget( 'SCFW_Widget' ); 
    17 } 
    1812 
    1913class SCFW_Widget extends WP_Widget { 
     
    362356 
    363357    /** 
    364      * Widget setup. 
     358     * Constructor. Sets up the widget name, description, etc. 
    365359     */ 
    366     function SCFW_Widget() { 
    367         /* Widget settings. */ 
    368         $widget_ops = array( 'classname' => 'scfw', 'description' => __('Image links to subscription services and social networking sites.', 'scfw') ); 
    369  
    370         /* Widget control settings. */ 
    371         $control_ops = array( 'id_base' => 'scfw' ); 
    372  
    373         /* Create the widget. */ 
    374         $this->WP_Widget( 'scfw', __('Subscribe / Connect / Follow Widget', 'scfw'), $widget_ops, $control_ops ); 
     360    function __construct() { 
     361        parent::__construct( 
     362            'scfw', // Base ID 
     363            __('Subscribe / Connect / Follow Widget', 'scfw'), // Name 
     364            array( 'classname' => 'scfw', 'description' => __('Image links to subscription services and social networking sites.', 'scfw'), ) // Args 
     365            ); 
    375366    } 
    376      
    377  
    378          
     367 
     368    /** 
     369     * Register the widget. Should be hooked to 'widgets_init'. 
     370     */ 
     371    public static function register() { 
     372        register_widget( get_class() ); 
     373    } 
     374 
     375 
    379376 
    380377    function widget( $args, $instance ) { 
     
    579576 
    580577} 
     578add_action( 'widgets_init', array('SCFW_Widget', 'register') ); 
    581579 
    582580 
Note: See TracChangeset for help on using the changeset viewer.