| @@ -79,9 +79,9 @@ | ||
| 79 | 79 | |
| 80 | 80 | $username = $actor->get_preferred_username() ?: $actor->get_name() ?: Sanitize::webfinger( $result[0] ); |
| 81 | 81 | $url = object_to_uri( $actor->get_url() ?: $actor->get_id() ); |
| 82 | 82 | |
| 83 | - return \sprintf( '<a rel="mention" class="u-url mention" href="%1$s">@%2$s</a>', \esc_url( $url ), \esc_html( $username ) ); | |
| 83 | + return \sprintf( '<a rel="mention" class="u-url mention" href="%1$s">@%2$s</a>', esc_url( $url ), esc_html( $username ) ); | |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * Get the Inboxes for the mentioned Actors. |
| @@ -95,9 +95,9 @@ | ||
| 95 | 95 | |
| 96 | 96 | foreach ( $mentioned as $actor ) { |
| 97 | 97 | $inbox = self::get_inbox_by_mentioned_actor( $actor ); |
| 98 | 98 | |
| 99 | - if ( ! \is_wp_error( $inbox ) && $inbox ) { | |
| 99 | + if ( ! is_wp_error( $inbox ) && $inbox ) { | |
| 100 | 100 | $inboxes[] = $inbox; |
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
| @@ -140,9 +140,9 @@ | ||
| 140 | 140 | public static function extract_mentions( $mentions, $post_content ) { |
| 141 | 141 | \preg_match_all( '/@' . ACTIVITYPUB_USERNAME_REGEXP . '/i', $post_content, $matches ); |
| 142 | 142 | foreach ( $matches[0] as $match ) { |
| 143 | 143 | $link = Webfinger::resolve( $match ); |
| 144 | - if ( ! \is_wp_error( $link ) ) { | |
| 144 | + if ( ! is_wp_error( $link ) ) { | |
| 145 | 145 | $mentions[ $match ] = $link; |
| 146 | 146 | } |
| 147 | 147 | } |
| 148 | 148 | return \array_unique( $mentions ); |