Added support for GET statuses/mentions_timeline. The user can select, in the widget and shortcode, if he wants to display mentions or not (default = false). Mentions are merged into GET statuses/user_timeline and the merged timeline is sorted on created_at


Here's some of changes
[diff]
- $response = $this->_wp_twitter_oauth->send_authed_request( 'statuses/user_timeline', 'GET', $parameters );
- if ( ! is_wp_error( $response ) )
- return $response;
+ $user_timeline = $this->_wp_twitter_oauth->send_authed_request( 'statuses/user_timeline', 'GET', $parameters );
+ if ( 'true' == $widgetOptions['showmentions'] ) {
+ $mentions_timeline = $this->_wp_twitter_oauth->send_authed_request( 'statuses/mentions_timeline', 'GET', $parameters);
+ if ( ! is_wp_error( $user_timeline ) && ! is_wp_error( $mentions_timeline )) {
+ $merged_timeline = array_merge_recursive($user_timeline,$mentions_timeline);
+ if (usort($merged_timeline,array($this,"_created_at_compare"))) {
+ return $merged_timeline;
+ }
+ }
+ } else if ( ! is_wp_error( $user_timeline ) ) {
+ return $user_timeline;
+ }
[/diff]

You'll find my fork at https://github.com/soderlind/twitter-widget-pro
The pull request is at https://github.com/OpenRange/twitter-widget-pro/pull/11