PluginProbe ʕ •ᴥ•ʔ
Custom Twitter Feeds – A Tweets Widget or X Feed Widget / 2.8.0
Custom Twitter Feeds – A Tweets Widget or X Feed Widget v2.8.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 / templates / author.php
custom-twitter-feeds / templates Last commit date
actions.php 3 weeks ago author.php 3 weeks ago error.php 3 weeks ago feed.php 3 weeks ago footer.php 3 weeks ago header-generic.php 3 weeks ago header-text.php 3 weeks ago header.php 3 weeks ago item.php 3 weeks ago linkbox.php 3 weeks ago
author.php
85 lines
1 <?php
2 /**
3 * Smash Balloon Custom Twitter Feeds Author Template
4 * Information about the person tweeting, replying, or quoting
5 *
6 * @version 2.0.4 Custom Twitter Feeds by Smash Balloon
7 *
8 */
9 use TwitterFeed\CTF_Parse;
10 use TwitterFeed\CTF_Display_Elements;
11 use TwitterFeed\CTF_GDPR_Integrations;
12
13 $author_display_name = CTF_Parse::get_display_author_name( $post );
14 $author_screen_name = CTF_Parse::get_author_screen_name( $post );
15 $avatar_src = CTF_Parse::get_avatar_url( $post, $feed_options );
16 $post_id = CTF_Parse::get_tweet_id( $post );
17 $utc_offset = CTF_Parse::get_utc_offset( $post );
18 $created_at = CTF_Parse::get_original_timestamp( $post );
19 $verified = CTF_Parse::get_verified( $post );
20
21 $author_attr = CTF_Display_Elements::get_element_attribute( 'author', $feed_options );
22 $avatar_attr = CTF_Display_Elements::get_element_attribute( 'avatar', $feed_options );
23 $author_text_attr = CTF_Display_Elements::get_element_attribute( 'author_text', $feed_options );
24 $date_attr = CTF_Display_Elements::get_element_attribute( 'date', $feed_options );
25 $logo_attr = CTF_Display_Elements::get_element_attribute( 'logo', $feed_options );
26 $retweeter_attr = CTF_Display_Elements::get_element_attribute( 'retweeter', $feed_options );
27
28 $created_at = CTF_Parse::get_original_timestamp( $post );
29 $date_text_attr = CTF_Display_Elements::get_post_date_attr( $created_at, $feed_options );
30
31 if (isset( $retweeter ) && ctf_show( 'retweeter', $feed_options )) :
32 $retweeter_name = $retweeter['name'];
33 $retweeter_screen_name = $retweeter['screen_name'];
34 ?>
35 <div class="ctf-context" <?php echo $retweeter_attr ?>>
36 <a href="<?php echo esc_url( 'https://twitter.com/intent/user?screen_name=' . $retweeter_screen_name ) ?>" target="_blank" rel="nofollow noopener noreferrer" class="ctf-retweet-icon"><?php echo ctf_get_fa_el( 'fa-retweet' ) ?><span class="ctf-screenreader"><?php esc_html_e( 'Retweet on Twitter', 'custom-twitter-feeds' ); ?></span></a>
37 <a href="<?php echo esc_url( 'https://twitter.com/' . strtolower( $retweeter_screen_name ) ) ?>" target="_blank" rel="nofollow noopener noreferrer" class="ctf-retweet-text"><?php echo esc_html( $retweeter_name . ' ' . __( $feed_options['retweetedtext'], 'custom-twitter-feeds' ) )?></a>
38 </div>
39 <?php endif; ?>
40
41 <?php if (ctf_show( 'avatar', $feed_options ) || ctf_show( 'author', $feed_options ) || ctf_show( 'logo', $feed_options ) || ctf_show( 'date', $feed_options )) : ?>
42 <div class="ctf-author-box">
43 <div class="ctf-author-box-link">
44 <?php if (ctf_show( 'author', $feed_options )) : ?>
45 <?php if(ctf_show( 'avatar', $feed_options )): ?>
46 <a href="https://twitter.com/<?php echo $author_screen_name ?>" class="ctf-author-avatar" target="_blank" rel="noopener noreferrer" <?php echo $avatar_attr ?>>
47 <?php if (CTF_GDPR_Integrations::doing_gdpr( $feed_options )) : ?>
48 <span data-avatar="<?php echo esc_url( CTF_Parse::get_avatar( $post ) ) ?>" data-alt="<?php echo esc_attr( $author_screen_name ) ?>">Avatar</span>
49 <?php else: ?>
50 <img src="<?php echo esc_url( $avatar_src ) ?>" alt="<?php echo esc_attr( $author_screen_name ); ?>" width="48" height="48">
51 <?php endif; ?>
52 </a>
53 <?php endif;?>
54
55 <?php if (ctf_show( 'author_text', $feed_options )): ?>
56 <h3 class="ctf-author-name-heading" style="display:inline;margin:0;padding:0;font:inherit;color:inherit;"><a href="<?php echo esc_url( 'https://twitter.com/' . $author_screen_name ); ?>" target="_blank" rel="noopener noreferrer" class="ctf-author-name" <?php echo $author_text_attr; ?>><?php echo esc_html( $author_display_name ); ?></a></h3>
57 <?php if ((int) $verified === 1) : ?>
58 <span class="ctf-verified" <?php echo $author_text_attr; ?> ><?php echo ctf_get_fa_el( 'fa-check-circle' ) ?><span class="ctf-screenreader"><?php esc_html_e( 'Verified account', 'custom-twitter-feeds' ); ?></span></span>
59 <?php endif;?>
60 <a href="<?php echo esc_url( 'https://twitter.com/' . $author_screen_name ); ?>" class="ctf-author-screenname" target="_blank" rel="noopener noreferrer" <?php echo $author_text_attr; ?>>@<?php echo esc_html( $author_screen_name ); ?></a>
61 <span class="ctf-screename-sep">&middot;</span>
62 <?php endif;?>
63 <?php endif; ?>
64
65 <?php if (ctf_show( 'date', $feed_options )): ?>
66 <div class="ctf-tweet-meta" <?php echo $date_attr ?>>
67 <a href="<?php echo esc_url( 'https://twitter.com/' . $author_screen_name . '/status/' . $post_id ); ?>" class="ctf-tweet-date" target="_blank" rel="noopener noreferrer" <?php echo $date_text_attr; ?>><?php echo ctf_get_formatted_date( $created_at, $feed_options, $utc_offset ) ?></a>
68 </div>
69 <?php endif; ?>
70 </div>
71 <?php if (ctf_show( 'logo', $feed_options )) : ?>
72 <div class="ctf-corner-logo" <?php echo $logo_attr ?>>
73 <?php
74 if ( ctf_should_rebrand_to_x() ) {
75 echo ctf_get_fa_el( 'fa-x' );
76 } else {
77 echo ctf_get_fa_el( 'fa-twitter' );
78 }
79 ?>
80 </div>
81 <?php endif; ?>
82
83 </div>
84 <?php endif; ?>
85