@@ 85-89 (lines=5) @@ | ||
82 | // 'likes' are not available in Jetpack |
|
83 | $ordering = isset( $instance['ordering'] ) && 'likes' === $instance['ordering'] ? 'likes' : 'views'; |
|
84 | ||
85 | if ( isset( $instance['display'] ) && in_array( $instance['display'], array( 'grid', 'list', 'text' ) ) ) { |
|
86 | $display = $instance['display']; |
|
87 | } else { |
|
88 | $display = 'text'; |
|
89 | } |
|
90 | ||
91 | ?> |
|
92 | ||
@@ 197-201 (lines=5) @@ | ||
194 | } |
|
195 | } |
|
196 | ||
197 | if ( isset( $new_instance['display'] ) && in_array( $new_instance['display'], array( 'grid', 'list', 'text' ) ) ) { |
|
198 | $instance['display'] = $new_instance['display']; |
|
199 | } else { |
|
200 | $instance['display'] = 'text'; |
|
201 | } |
|
202 | ||
203 | /** |
|
204 | * Filters Top Posts Widget settings before they're saved. |
|
@@ 251-255 (lines=5) @@ | ||
248 | // 'likes' are not available in Jetpack |
|
249 | $ordering = isset( $instance['ordering'] ) && 'likes' == $instance['ordering'] ? 'likes' : 'views'; |
|
250 | ||
251 | if ( isset( $instance['display'] ) && in_array( $instance['display'], array( 'grid', 'list', 'text' ) ) ) { |
|
252 | $display = $instance['display']; |
|
253 | } else { |
|
254 | $display = 'text'; |
|
255 | } |
|
256 | ||
257 | if ( 'text' != $display ) { |
|
258 | $get_image_options = array( |