You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, I'm trying to see if I can get an official answer here.
I had an experience recently, I needed to filter the output of the core/author-biography block on the front-end.
In the blocks render function there is the following: $author_biography = get_the_author_meta( 'description', $author_id );
Is there any reason that there is no localised apply_filters function used here? I know you could use the filter: "get_the_author_{$field}", but then you have the issue of context. What if I only wanted to filter in the block. Currently I would have to hijack the entire render function?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone, I'm trying to see if I can get an official answer here.
I had an experience recently, I needed to filter the output of the core/author-biography block on the front-end.
In the blocks render function there is the following:
$author_biography = get_the_author_meta( 'description', $author_id );
Is there any reason that there is no localised apply_filters function used here? I know you could use the filter: "get_the_author_{$field}", but then you have the issue of context. What if I only wanted to filter in the block. Currently I would have to hijack the entire render function?
I really look forward to reading the responses.
Thanks,
Luke.
Beta Was this translation helpful? Give feedback.
All reactions