PluginProbe ʕ •ᴥ•ʔ
Custom Twitter Feeds – A Tweets Widget or X Feed Widget / 2.7.0
Custom Twitter Feeds – A Tweets Widget or X Feed Widget v2.7.0
2.8.0 2.7.0 2.6.1 2.6.0 1.0 1.0.1 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.2 1.2.1 1.2.10 1.2.11 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3 1.4 1.4.1 1.5 1.5.1 1.6 1.6.1 1.7 1.8 1.8.1 1.8.2 1.8.3 1.8.4 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1 2.1.1 2.1.2 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.5.4 2.5.5 trunk
custom-twitter-feeds / inc / V2 / UserAdapter.php
custom-twitter-feeds / inc / V2 Last commit date
Adapter.php 1 month ago CtfOauthConnect.php 1 month ago MediaAdapter.php 1 month ago TweetAdapter.php 1 month ago TwitterHelperApi.php 1 month ago UserAdapter.php 1 month ago
UserAdapter.php
37 lines
1 <?php
2
3 /**
4 * Class for converting user sub attribute from Twitter API v1.1 to v2.
5 *
6 * @package twitter-api-v2
7 */
8
9 namespace TwitterFeed\V2;
10
11 // Don't load directly.
12 if (! defined('ABSPATH')) {
13 die('-1');
14 }
15
16 /**
17 * UserAdapter class.
18 */
19 class UserAdapter extends Adapter {
20
21 /**
22 * Get mapped fields.
23 *
24 * @return array
25 */
26 public function getMappedFields()
27 {
28 return [
29 'screen_name' => 'username',
30 'profile_image_url_https' => 'profile_image_url',
31 'followers_count' => [ 'public_metrics', 'followers_count' ],
32 'statuses_count' => [ 'public_metrics', 'tweet_count' ],
33 'utc_offset' => '',
34 ];
35 }
36 }
37