質問するログイン新規登録

回答編集履歴

1

display_name に変更

2019/07/19 06:54

投稿

YukiYamashina
YukiYamashina

スコア1011

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( 'nicename', get_post_field( 'post_author', (int) $_GET['bbp_reply_to'] ) );
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