Skip to content

Commit

Permalink
Change Author Nice Name to Display Name (#25)
Browse files Browse the repository at this point in the history
Change @/author to return display name set by user in user administration instead of nicename.
  • Loading branch information
Ekhaus authored and Log1x committed Oct 17, 2019
1 parent feb23c6 commit 448d968
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Directives/WordPress.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@

'author' => function ($expression) {
if (! empty($expression)) {
return "<?= get_the_author_meta('user_nicename', {$expression}); ?>";
return "<?= get_the_author_meta('display_name', {$expression}); ?>";
}

return "<?= get_the_author_meta('user_nicename'); ?>";
return "<?= get_the_author_meta('display_name'); ?>";
},

'authorurl' => function ($expression) {
Expand Down

0 comments on commit 448d968

Please sign in to comment.