Skip to content

Commit

Permalink
Merge pull request #6131 from Automattic/fix/twitter-noscrollbar
Browse files Browse the repository at this point in the history
Twitter Widget: add noscrollbar option back.
  • Loading branch information
jeherve authored Jan 30, 2017
2 parents b8c25f8 + e585638 commit b293b18
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions modules/widgets/twitter-timeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function widget( $args, $instance ) {
echo $args['before_widget'];

$title = isset( $instance['title'] ) ? $instance['title'] : '';

/** This filter is documented in core/src/wp-includes/default-widgets.php */
$title = apply_filters( 'widget_title', $title );
if ( ! empty( $title ) ) {
Expand Down Expand Up @@ -239,7 +239,8 @@ public function update( $new_instance, $old_instance ) {
'noheader',
'nofooter',
'noborders',
'transparent'
'transparent',
'noscrollbar',
);
if ( isset( $new_instance['chrome'] ) ) {
foreach ( $new_instance['chrome'] as $chrome ) {
Expand Down Expand Up @@ -431,6 +432,16 @@ class="widefat"
<?php esc_html_e( 'No Borders', 'jetpack' ); ?>
</label>
<br />
<input
type="checkbox"<?php checked( in_array( 'noscrollbar', $instance['chrome'] ) ); ?>
id="<?php echo $this->get_field_id( 'chrome-noscrollbar' ); ?>"
name="<?php echo $this->get_field_name( 'chrome' ); ?>[]"
value="noscrollbar"
/>
<label for="<?php echo $this->get_field_id( 'chrome-noscrollbar' ); ?>">
<?php esc_html_e( 'No Scrollbar', 'jetpack' ); ?>
</label>
<br />
<input
type="checkbox"<?php checked( in_array( 'transparent', $instance['chrome'] ) ); ?>
id="<?php echo $this->get_field_id( 'chrome-transparent' ); ?>"
Expand Down

0 comments on commit b293b18

Please sign in to comment.