Plugin Directory

Changeset 896915


Ignore:
Timestamp:
04/18/2014 01:19:09 AM (12 years ago)
Author:
wearepixel8
Message:

Fixed undefined index errors

Location:
flickr-me/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • flickr-me/trunk/changelog.txt

    r847722 r896915  
    77===============
    88
    9 * The widget not fetches feeds of HTTPS to prevent mix-content warnings (Props to Nick Dery)
     9* The widget now fetches feeds over HTTPS to prevent mix-content warnings (Props to Nick Dery)
     10
     11Flickr Me 1.0.2
     12===============
     13
     14* Fixed undefined index errors in the widget
  • flickr-me/trunk/flickr-me.php

    r847722 r896915  
    55Plugin URI: http://www.wearepixel8.com/plugins/flickr-me
    66Description: Add a Flickr feed to any widget ready area
    7 Version: 1.0.1
     7Version: 1.0.2
    88Author: We Are Pixel8
    99Author URI: http://www.wearepixel8.com
     
    3030
    3131define( 'WAP8_FLICKR_ME', plugin_dir_path( __FILE__ ) );
    32 define( 'WAP8_FLICKR_ME_VERSION', '1.0.0' );
     32define( 'WAP8_FLICKR_ME_VERSION', '1.0.2' );
    3333
    3434/*-----------------------------------------------------------------------------------*/
  • flickr-me/trunk/includes/flickr-me-widget.php

    r847722 r896915  
    8585 * @package Flickr Me
    8686 * @version 1.0.0
    87  * @since 1.0.1 Fetching feed over HTTPS
     87 * @since 1.0.2 Fixed undefined index errors
    8888 * @author Erik Ford for We Are Pixel8 <@notdivisible>
    8989 *
     
    116116       
    117117        // saved widget settings
    118         $title        = apply_filters( 'widget_title', $instance['title'] );
    119         $flickr_id    = $instance['flickr_id'];
    120         $thumb        = $instance['flickr_thumb'];
    121         $flickr_title = $instance['flickr_title'];
    122         $flickr_group = $instance['flickr_group'];
    123         $flickr_count = $instance['flickr_count'];
     118        $title        = isset( $instance['title'] ) ? $instance['title'] : __( 'Flickr Feed', 'wap8plugin-i18n' );
     119        $title        = apply_filters( 'widget_title', $title );
     120        $flickr_id    = isset( $instance['flickr_id'] ) ? $instance['flickr_id'] : '';
     121        $thumb        = isset( $instance['flickr_thumb'] ) ? $instance['flickr_thumb'] : 'lsquare';
     122        $flickr_title = isset( $instance['flickr_title'] ) ? $instance['flickr_title'] : 0;
     123        $flickr_group = isset( $instance['flickr_group'] ) ? $instance['flickr_group'] : 0;
     124        $flickr_count = isset( $instance['flickr_count'] ) ? $instance['flickr_count'] : 5;
    124125       
    125126        include_once( ABSPATH . WPINC . '/feed.php' ); // load feed.php
     
    179180    function update( $new_instance, $old_instance ) {
    180181       
    181         $instance                    = $old_instance;
    182         $instance['title']           = strip_tags( $new_instance['title'] );
    183         $instance['flickr_id']       = strip_tags( $new_instance['flickr_id'] );
    184         $instance['flickr_title']    = isset( $new_instance['flickr_title'] );
    185         $instance['flickr_thumb']    = $new_instance['flickr_thumb'];
    186         $instance['flickr_group']    = isset( $new_instance['flickr_group'] );
    187         $instance['flickr_count']    = absint( $new_instance['flickr_count'] );
     182        $instance                 = $old_instance;
     183        $instance['title']        = strip_tags( $new_instance['title'] );
     184        $instance['flickr_id']    = strip_tags( $new_instance['flickr_id'] );
     185        $instance['flickr_title'] = isset( $new_instance['flickr_title'] );
     186        $instance['flickr_thumb'] = $new_instance['flickr_thumb'];
     187        $instance['flickr_group'] = isset( $new_instance['flickr_group'] );
     188        $instance['flickr_count'] = absint( $new_instance['flickr_count'] );
    188189       
    189190        return $instance;
  • flickr-me/trunk/readme.txt

    r847722 r896915  
    33Tags: flickr, images, photos, sidebar, widget
    44Requires at least: 3.1
    5 Compatible up to: 3.8.1
    6 Tested up to: 3.8.1
    7 Stable tag: 1.0.1
     5Compatible up to: 3.9
     6Tested up to: 3.9
     7Stable tag: 1.0.2
    88License: GPLv2
    99
     
    4242= 1.0.1 =
    4343* The widget not fetches feeds of HTTPS to prevent mix-content warnings (Props to Nick Dery)
     44
     45= 1.0.2 =
     46* Fixed undefined index errors in the widget
Note: See TracChangeset for help on using the changeset viewer.