phpcs
This commit is contained in:
parent
8391e713c9
commit
3db9489b5c
1 changed files with 1 additions and 2 deletions
|
@ -35,10 +35,9 @@ class Mention {
|
||||||
* @return string the final string
|
* @return string the final string
|
||||||
*/
|
*/
|
||||||
public static function replace_with_links( $result ) {
|
public static function replace_with_links( $result ) {
|
||||||
error_log($result[0]);
|
|
||||||
$metadata = \ActivityPub\get_remote_metadata_by_actor( $result[0] );
|
$metadata = \ActivityPub\get_remote_metadata_by_actor( $result[0] );
|
||||||
if ( ! is_wp_error( $metadata ) ) {
|
if ( ! is_wp_error( $metadata ) ) {
|
||||||
$username = ltrim( $result[0], '@');
|
$username = ltrim( $result[0], '@' );
|
||||||
if ( ! empty( $metadata['name'] ) ) {
|
if ( ! empty( $metadata['name'] ) ) {
|
||||||
$username = $metadata['name'];
|
$username = $metadata['name'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue