Plugin Directory

Changeset 1609785


Ignore:
Timestamp:
03/07/2017 01:28:06 PM (9 years ago)
Author:
livingos
Message:

Removed deprecated function calls

Location:
themeloom-widgets/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • themeloom-widgets/trunk/css/widget.css

    r824646 r1609785  
    212212        float:none;
    213213        width:auto;
     214        margin-right:0;
    214215    }
    215216
  • themeloom-widgets/trunk/facebook-widget.php

    r1323127 r1609785  
    361361}
    362362}
    363 
    364 
    365 
    366 
    367 ?>
  • themeloom-widgets/trunk/flickr-widget.php

    r726213 r1609785  
    77   
    88    /* This is the constructor for the Widget, here we setup some variables that define the widget's name and description and add any actions or filters that the widget will use. */
    9    
    10     function ThemeLoomFlickrWidget() {
    11        
    12         /* Here we define widget options to add a description to the widget in the WordPress Widget Administration page */
    13         $widget_ops = array('description' => __('This widget displays a flickr badge.', 'livingos') );
    14 
    15         /* Here we pass some arguments to the WP_Widget constructor so that we can override some Widget properties.
    16             The first parameter allows us to override the id_base of the widget.
    17             The second parameter allows us to pass in the internationalized title of the widget.
    18             The third parameter lets us pass in some additional options (such as an internationalized description of the widget). */
    19            
    20         parent::WP_Widget( 'ThemeLoomFlickrWidget', __('Flickr Widget','livingos'), $widget_ops);
    21        
    22         /* This function checks if this widget is currently added to any sidebars. If your widget requires external JavaScript or CSS, you should only include it if the widget is actually active. Otherwise, you'll be slowing down page loads by including these external files, when they aren't even being used! */
    23        
    24          if (is_active_widget(false, false, $this->id_base) )
    25          {
    26             //add_action( 'template_redirect', array($this, 'WidgetCss') );
    27         }
    28        
    29     }
     9    public function __construct() {
     10        parent::__construct(
     11            'ThemeLoomFlickrWidget', // Base ID
     12            __('Flickr Widget','livingos'), // Name
     13            array( 'description' => __( 'This widget displays a flickr badge.', 'livingos' ), ) // Args
     14        );
     15    }
    3016   
    3117    /* This function renders the form that lets the user setup your widget's settings. You can let your users customize the title of your widget, toggle features on or off, etc... It is very easy to add some settings fields, and since WP_Widgets can be used multiple times each instance of your widget can have different settings. This function takes in one parameter, which is an array of the previously saved settings. If the user has just dragged a new instance of the widget to one of their sidebars, this will be an empty array. */
     
    159145   
    160146}
    161 ?>
  • themeloom-widgets/trunk/readme.txt

    r1323127 r1609785  
    33Donate link: http://livingos.com/
    44Tags: widgets, posts, pages, query, responsive, twitter, flickr, facebook
    5 Requires at least: 3.5
    6 Tested up to: 4.4.1
     5Requires at least: 4.2
     6Tested up to: 4.7.3
    77Stable tag: trunk
    88License: GPLv2 or later
     
    7676== Changelog ==
    7777
     78= 1.8.3 =
     79* updated deprecated functions
    7880* fixed margin on mobile columns
    7981
  • themeloom-widgets/trunk/show-widgets.php

    r773963 r1609785  
    1010class los_showposts_widget extends WP_Widget {
    1111
    12     function los_showposts_widget() {
    13         $widget_ops = array('classname' => 'LOSPostsWidget', 'description' => __('Show teasers/list of posts with thumbs, filtered by category.','livingos') );
    14         $this->WP_Widget('los_show_posts', __('Show Posts', 'livingos'), $widget_ops);
    15     }
     12    public function __construct() {
     13        parent::__construct(
     14            'los_showposts_widget', // Base ID
     15            __('Show Posts', 'livingos'), // Name
     16            array( 'description' => __('Show teasers/list of posts with thumbs, filtered by category.','livingos'), ) // Args
     17        );
     18    }
     19
    1620
    1721    function form($instance) {
     
    472476
    473477    static $text_domain = "livingos";  //allows class to be used in plugin or theme
    474    
    475     function los_showpages_widget() {
    476         $widget_ops = array('classname' => 'LOSPagesWidget', 'description' => __('Show teasers/list of pages with thumbs.','livingos') );
    477         $this->WP_Widget('los_show_pages', __('Show Pages','livingos'), $widget_ops);
    478     }
     478
     479    public function __construct() {
     480        parent::__construct(
     481            'los_show_pages', // Base ID
     482            __('Show Pages', 'livingos'), // Name
     483            array( 'description' =>  __('Show teasers/list of pages with thumbs.','livingos'), ) // Args
     484        );
     485    }
    479486
    480487    function form($instance) {
     
    616623class los_media_widget extends WP_Widget {
    617624
    618 
    619     function los_media_widget() {
    620         $widget_ops = array('classname' => 'LOSMediaWidget', 'description' => __('Show latest posts in category with audio attachments.','livingos') );
    621         $this->WP_Widget('los_media_widget', __('Show Media Posts','livingos'), $widget_ops);
    622     }
     625    public function __construct() {
     626        parent::__construct(
     627            'los_media_widget', // Base ID
     628            __('Show Media Posts','livingos'), // Name
     629            array( 'description' =>  __('Show latest posts in category with audio attachments.','livingos'), ) // Args
     630        );
     631    }
    623632
    624633    function form($instance) {
  • themeloom-widgets/trunk/themeloom-widgets.php

    r1323127 r1609785  
    33Plugin Name: ThemeLoom Widgets
    44Description: A set of really useful widgets for showing posts, pages, tweets and your flickr images. Designed for use with responsive themes.
    5 Version: 1.8.2
     5Version: 1.8.3
    66License: GPLv2
    77Author: Tim Hyde
     
    3737    public function __construct()
    3838    {
    39        
    40        
     39
     40
    4141        // localization
    4242        add_action('plugins_loaded', array($this, 'SetLanguage'),1);
     
    6464        $this->errors = new WP_Error();
    6565    }
    66    
     66
    6767    /*
    6868     *  Activation routine
    6969     */
    70     function Activate() 
     70    function Activate()
    7171    {
    72    
     72
    7373    }
    74    
     74
    7575    /*
    7676     *  Deactivation routine
     
    8080        // Nothing to see here for now!
    8181    }
    82    
    83    
     82
     83
    8484    /*
    8585     *  Update routine
     
    8787    function Update()
    8888    {
    89    
    90    
     89
     90
    9191    }
    92    
    93    
     92
     93
    9494    /*
    9595     *  Load language text domain
     
    180180  }
    181181}
    182 ?>
  • themeloom-widgets/trunk/twitter-widget.php

    r760694 r1609785  
    8585//define twitter widget
    8686class los_twitter_widget extends WP_Widget {
    87    
    88     function los_twitter_widget() {
    89         $widget_ops = array('classname' => 'LOSTwitterWidget', 'description' => __('Show latest twitter tweets.','livingos') );
    90         $this->WP_Widget('los_twitter_widget', __('Twitter Widget','livingos'), $widget_ops);
    91        
    92     }
     87
     88    public function __construct() {
     89        parent::__construct(
     90            'los_twitter_widget', // Base ID
     91            __('Twitter Widget','livingos'), // Name
     92            array( 'description' =>  __('Show latest twitter tweets.','livingos'), ) // Args
     93        );
     94    }
    9395
    9496    function form($instance) {
Note: See TracChangeset for help on using the changeset viewer.