#48550 closed feature request (fixed)
Twenty Twenty: Customizer option to show or hide author bio
Reported by: | williampatton | Owned by: | ianbelanger |
---|---|---|---|
Milestone: | 5.3.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch commit |
Focuses: | ui | Cc: |
Description
Consider adding an option to show/hide the author bio.
A PR exists with code for this one at the original repo which a patch can be generated from.
Issue: https://github.com/WordPress/twentytwenty/issues/524
PR: https://github.com/WordPress/twentytwenty/pull/525
CC: @acosmin
Attachments (3)
Change History (22)
#8
follow-up:
↓ 9
@
5 years ago
Do note that this patch will cause the author bio to be hidden on existing installations until someone goes into the Customizer and saves the default setting, I believe.
#9
in reply to:
↑ 8
@
5 years ago
Replying to dlh:
Do note that this patch will cause the author bio to be hidden on existing installations until someone goes into the Customizer and saves the default setting, I believe.
Good catch, David! I just added a default statement to get_theme_mod( 'show_author_bio', true )
, which should do the trick. Would you mind running a quick test, to see if this adjustment fixes the issue you've mentioned?
#10
follow-up:
↓ 11
@
5 years ago
That should do it, @nielslange!
It would be nice if the default value was centralized into a variable or constant and documented so that the separate uses with get_theme_mod()
and WP_Customize_Setting
stayed in sync. But I'm not sure where it would be best to try to do that in Twenty Twenty.
#11
in reply to:
↑ 10
@
5 years ago
- Focuses ui added
It would be nice if the default value was centralized into a variable or constant and documented so that the separate uses with
get_theme_mod()
andWP_Customize_Setting
stayed in sync. But I'm not sure where it would be best to try to do that in Twenty Twenty.
Isn't show_author_bio
the centralized "variable" in this case, @dlh? I'm not sure I understand your question correctly here. 🤔
#12
@
5 years ago
Sorry, I mean the value of true
now being passed both as the $default
to get_theme_mod()
and the 'default'
to WP_Customize_Setting
. It would be easy for a future developer to change one in a patch without realizing the other should be changed to match, assuming that it's not just coincidence that they're the same now.
#13
@
5 years ago
- Keywords commit added; needs-testing removed
This looks good, I tested the feature and it works as intended. I am going to mark it for commit, but I am not sure that we can get it in on a minor release. If we can, I will get t committed.
Thanks for the patch @nielslange and for testing @dlh
#17
@
5 years ago
@ianbelanger After a commit to trunk, please don't forget to reopen the ticket for minor release consideration, and add the `fixed-major` keyword.
Otherwise the ticket stays on the 5.3.1 milestone, but the changes are not actually included in 5.3.1. Thanks! :)
#18
follow-up:
↓ 19
@
5 years ago
Thanks for the reminder @SergeyBiryukov. Do I need to do it on this ticket? Since it's already been backported.
#19
in reply to:
↑ 18
@
5 years ago
Replying to ianbelanger:
Do I need to do it on this ticket? Since it's already been backported.
Just a note for the future :)
@williampatton & @ianbelanger I challenged myself to create a patch without looking at @acosmin's proposed solution and the result is pretty close. Feel free to test it and give props to @acosmin for fixing this issue first. 😀