More reliable way to get author and autorurl (#546)
--------- Co-authored-by: Matt Wiebe <wiebe@automattic.com>
This commit is contained in:
parent
74a774e8e7
commit
9d5bd8c220
2 changed files with 5 additions and 2 deletions
|
@ -390,7 +390,8 @@ class Shortcodes {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = \get_the_author_meta( 'display_name', $item->post_author );
|
$author_id = \get_post_field( 'post_author', $item->ID );
|
||||||
|
$name = \get_the_author_meta( 'display_name', $author_id );
|
||||||
|
|
||||||
if ( ! $name ) {
|
if ( ! $name ) {
|
||||||
return '';
|
return '';
|
||||||
|
@ -415,7 +416,8 @@ class Shortcodes {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = \get_the_author_meta( 'user_url', $item->post_author );
|
$author_id = \get_post_field( 'post_author', $item->ID );
|
||||||
|
$url = \get_the_author_meta( 'user_url', $author_id );
|
||||||
|
|
||||||
if ( ! $url ) {
|
if ( ! $url ) {
|
||||||
return '';
|
return '';
|
||||||
|
|
|
@ -111,6 +111,7 @@ Project maintained on GitHub at [automattic/wordpress-activitypub](https://githu
|
||||||
* Improved: better error messages if remote profile is not accessible
|
* Improved: better error messages if remote profile is not accessible
|
||||||
* Improved: PHP 8.1 compatibility
|
* Improved: PHP 8.1 compatibility
|
||||||
* Fixed: don't try to parse mentions or hashtags for very large (>1MB) posts to prevent timeouts
|
* Fixed: don't try to parse mentions or hashtags for very large (>1MB) posts to prevent timeouts
|
||||||
|
* Improved: more reliable [ap_author], props @uk3
|
||||||
|
|
||||||
= 1.0.10 =
|
= 1.0.10 =
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue