Plugin Directory

Changeset 757222

Timestamp:
08/16/2013 04:48:50 PM (11 years ago)
Author:
tmoorewp
Message:

Widgets: Twitter Timeline: Update the height/width using correct params. Add the "tweet-limit" param.

Fixes #1775

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/widgets/twitter-timeline.php

    r728990 r757222  
    5050            echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title'];
    5151
    52         $data_attribs = array( 'widget-id', 'theme', 'link-color', 'border-color', 'chrome' );
     52        $data_attribs = array( 'widget-id', 'theme', 'link-color', 'border-color', 'chrome' );
    5353        $attribs      = array( 'width', 'height', 'lang' );
    5454
     
    5858        foreach ( $data_attribs as $att ) {
    5959            if ( !empty( $instance[$att] ) ) {
     60
     61
     62
    6063                if ( is_array( $instance[$att] ) )
    6164                    echo ' data-' . esc_attr( $att ) . '="' . esc_attr( join( ' ', $instance['chrome'] ) ) . '"';
     
    9598        $instance['width']   = (int) $new_instance['width'];
    9699        $instance['height']  = (int) $new_instance['height'];
    97         $instance['width']   = ( 0 !== (int) $instance['width'] )  ? (int) $instance['width']  : 225;
    98         $instance['height']  = ( 0 !== (int) $instance['height'] ) ? (int) $instance['height'] : 400;
     100        $instance['width']   = ( 0 !== (int) $new_instance['width'] )  ? (int) $new_instance['width']  : 225;
     101        $instance['height']  = ( 0 !== (int) $new_instance['height'] ) ? (int) $new_instance['height'] : 400;
     102        $instance['tweet-limit']   = (int) $new_instance['tweet-limit'];
    99103
    100104        // If they entered something that might be a full URL, try to parse it out
     
    168172        </p>
    169173
     174
     175
     176
     177
     178
    170179        <p><small>
    171180            <?php
Note: See TracChangeset for help on using the changeset viewer.