Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Render Social Icon */
- function jnews_social_icon($author_id) {
- $social_array = array(
- "url" => "fa-globe",
- "facebook" => "fa-facebook-official",
- "twitter" => "fa-twitter",
- "linkedin" => "fa-linkedin",
- "pinterest" => "fa-pinterest",
- "behance" => "fa-behance",
- "github" => "fa-github",
- "flickr" => "fa-flickr",
- "tumblr" => "fa-tumblr",
- "dribbble" => "fa-dribbble",
- "soundcloud" => "fa-soundcloud",
- "instagram" => "fa-instagram",
- "vimeo" => "fa-vimeo",
- "youtube" => "fa-youtube-play",
- "vk" => "fa-vk",
- "reddit" => "fa-reddit",
- "weibo" => "fa-weibo",
- "rss" => "fa-rss"
- );
- $socials = "";
- foreach ($social_array as $key => $value) {
- if( get_the_author_meta( $key, $author_id )){
- $socials = $socials . "<a target='_blank' href='".get_the_author_meta( $key, $author_id )."' class='".$key."'><i class='fa ".$value."'></i> </a>";
- }
- }
- echo jnews_sanitize_by_pass( $socials );
- }
- /* Add Meta */
- function jnews_video_meta() {
- $author_id = bp_displayed_user_id();
- ?>
- <div class="jeg_author_desc">
- <?php echo wpautop(get_the_author_meta( 'description', $author_id )); ?>
- </div>
- <?php if ( defined( 'JNEWS_ESSENTIAL' ) ) : ?>
- <div class="jeg_author_socials">
- <?php jnews_social_icon($author_id); ?>
- </div>
- <?php endif;
- }
- add_action( 'bp_profile_header_meta', 'jnews_video_meta' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement