-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLANET-7482 Use proper function for displaying author bio
We are currently using [the_author_meta](https://developer.wordpress.org/reference/functions/the_author_meta/). But the function doesn't return a string, which is what [wpautop](https://developer.wordpress.org/reference/functions/wpautop/) expects. This also triggers the following warning locally: ``` Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wp-includes/formatting.php on line 449 ``` Instead, we should use [get_the_author_meta](https://developer.wordpress.org/reference/functions/get_the_author_meta/) as it's also mentioned in the documentation of `the_author_meta`: >NOTE: Use `get_the_author_meta()` if you need to return (and do something with) the field, rather than just display it. This also fixes bug [PLANET-7482](https://jira.greenpeace.org/browse/PLANET-7482). So it includes some css changes to make the links also follow the correct design. On the Authors block (Post view), when the bio is bigger than our character limit, the `wpautop` is not used as it's hard to keep the formatting while breaking up the description text.
- Loading branch information
Showing
4 changed files
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters