回答編集履歴
1
display_name に変更
answer
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
```php
|
|
4
4
|
add_filter( 'bbp_get_form_reply_content', function( string $reply_content ) {
|
|
5
5
|
if ( isset( $_GET['bbp_reply_to'] ) && (int) $_GET['bbp_reply_to'] ) {
|
|
6
|
-
$display_name = get_the_author_meta( '
|
|
6
|
+
$display_name = get_the_author_meta( 'display_name', get_post_field( 'post_author', (int) $_GET['bbp_reply_to'] ) );
|
|
7
7
|
return '@' . $display_name . PHP_EOL . $reply_content;
|
|
8
8
|
}
|
|
9
9
|
|