mirror of
https://github.com/Automattic/wordpress-activitypub
synced 2024-10-18 12:23:32 +00:00
fix possible PHP Warning
This commit is contained in:
parent
f0d72c9c57
commit
12ab7768d4
1 changed files with 6 additions and 1 deletions
|
@ -123,9 +123,14 @@ class Extra_Fields {
|
|||
'type' => 'Link',
|
||||
'name' => \get_the_title( $post ),
|
||||
'href' => \esc_url( $tags->get_attribute( 'href' ) ),
|
||||
'rel' => explode( ' ', $tags->get_attribute( 'rel' ) ),
|
||||
);
|
||||
|
||||
$rel = $tags->get_attribute( 'rel' );
|
||||
|
||||
if ( $rel && \is_string( $rel ) ) {
|
||||
$attachment['rel'] = \explode( ' ', $rel );
|
||||
}
|
||||
|
||||
$link_added = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue