admin->admin_edit_user_link( false, $args['friend_user'] ); $_feeds = count( $args['friend_user']->get_feeds() ); $rules = count( $args['friend_user']->get_feed_rules() ); $active_feeds = count( $args['friend_user']->get_active_feeds() ); $hidden_post_count = $args['friend_user']->get_post_in_trash_count(); $display_name_html = Friends\Feed_Parser_ActivityPub::replace_custom_emojis_for_user( $args['friend_user']->display_name, $args['friend_user'] ); // Get ActivityPub feeds and their data (header image, profile URLs, summary). $activitypub_feeds = array(); $seen_activitypub_feeds = array(); $header_image_url = null; $activitypub_summary = null; foreach ( $args['friend_user']->get_active_feeds() as $feed ) { // Check if this is an ActivityPub feed (parser is 'activitypub'). if ( 'activitypub' !== $feed->get_parser() ) { continue; } $ap_actor_id = $feed->get_ap_actor_id(); $ap_actor_url = $feed->get_ap_actor_url(); $ap_actor_acct = Friends\Feed_Parser_ActivityPub::get_actor_acct_from_attributed_to( array( 'ap_actor_id' => $ap_actor_id, ) ); // If no actor URL from linked actor, use the feed URL as the actor URL. if ( ! $ap_actor_url ) { $ap_actor_url = $feed->get_url(); } if ( ! $ap_actor_url ) { continue; } $dedupe_key = $ap_actor_acct ? 'acct:' . strtolower( $ap_actor_acct ) : 'url:' . strtolower( untrailingslashit( $ap_actor_url ) ); if ( isset( $seen_activitypub_feeds[ $dedupe_key ] ) ) { continue; } $seen_activitypub_feeds[ $dedupe_key ] = true; $feed_data = array( 'url' => $ap_actor_url, 'acct' => $ap_actor_acct, ); // Try to get actor metadata including header image and summary. if ( class_exists( '\Activitypub\Collection\Remote_Actors' ) ) { $actor = null; // First try using the linked actor ID. if ( $ap_actor_id ) { $actor = \Activitypub\Collection\Remote_Actors::get_actor( $ap_actor_id ); } // If no linked actor or it failed, try fetching by URL. if ( ( ! $actor || is_wp_error( $actor ) ) && method_exists( '\Activitypub\Collection\Remote_Actors', 'get_by_uri' ) ) { $actor_post = \Activitypub\Collection\Remote_Actors::get_by_uri( $ap_actor_url ); if ( $actor_post instanceof \WP_Post ) { $actor = \Activitypub\Collection\Remote_Actors::get_actor( $actor_post->ID ); } } if ( $actor && ! is_wp_error( $actor ) ) { $image = $actor->get_image(); if ( $image ) { $feed_data['header'] = \Activitypub\object_to_uri( $image ); // Use the first header image found. if ( ! $header_image_url ) { $header_image_url = $feed_data['header']; } } // Get summary/bio if we don't have one yet. if ( ! $activitypub_summary ) { $summary = $actor->get_summary(); if ( $summary ) { $activitypub_summary = $summary; } } } } $activitypub_feeds[] = $feed_data; } // Use ActivityPub summary as fallback for user description. $user_description = $args['friend_user']->description; if ( empty( $user_description ) && $activitypub_summary ) { $user_description = $activitypub_summary; } ?>
style="background-image: url('');">

is_starred() ) : ?> frontend->reaction ) { echo esc_html( sprintf( // translators: %1$s is an emoji reaction, %2$s is a type of feed, e.g. "Main Feed". __( 'My %1$s reactions on %2$s', 'friends' ), $args['friends']->frontend->reaction, $args['friend_user']->display_name ) ); } else { if ( $args['friend_user']->get_avatar_url() ) { ?> <?php echo esc_attr( $args['friend_user']->display_name ); ?>

', '
', $user_description ) ), array( 'a' => array( 'href' => array() ), 'span' => array( 'class' => array() ), 'br' => array(), ) ); ?>

user_registered ) ) ) ); ?> user_url ) ) { $user_url_parts = wp_parse_url( $args['friend_user']->user_url ); if ( isset( $user_url_parts['host'] ) ) { $user_hostname = $user_url_parts['host']; if ( substr( $user_hostname, 0, 4 ) === 'www.' ) { $user_hostname = substr( $user_hostname, 4 ); } if ( isset( $user_url_parts['path'] ) && substr( $user_url_parts['path'], 0, 2 ) === '/@' ) { $p = strpos( $user_url_parts['path'], '/', 1 ); if ( false === $p ) { $p = strlen( $user_url_parts['path'] ); } $user_hostname .= esc_html( substr( $user_url_parts['path'], 0, $p ) ); } ?> get_post_count_by_post_format() as $post_format => $count ) : ?> get_post_format_plural_string( $post_format, $count ) ); ?> 0 ) : ?> $reaction ) : ?> char ) ); ?> 1 ) : ?>   0 ) : ?> get_folder(); $_current_id = $_current_folder ? $_current_folder->term_id : 0; $_folder_nonce = wp_create_nonce( 'friends-move-to-folder' ); ?> 📁 can_refresh_feeds() ) : ?>