#51296 closed enhancement (fixed)
Return result of set_theme_mod
Reported by: | latifi | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | has-patch |
Focuses: | Cc: |
Description
Return result of set_theme_mod to handle errors
Attachments (1)
Change History (7)
This ticket was mentioned in PR #529 on WordPress/wordpress-develop by rezza007.
4 years ago
#1
- Keywords has-patch added
#2
@
4 years ago
- Milestone changed from Awaiting Review to 5.6
- Owner changed from latifi to SergeyBiryukov
- Status changed from assigned to reviewing
#3
follow-up:
↓ 5
@
4 years ago
Hi @latifi, welcome to Trac. Thanks for the ticket and PR.
I have refreshed the patch in 51296.diff. Also updated @return
in the doc block.
Should we also update the remove_theme_mod
function?
#5
in reply to:
↑ 3
@
4 years ago
Replying to Hareesh Pillai:
I have refreshed the patch in 51296.diff. Also updated
@return
in the doc block.
Thanks for the refresh!
Should we also update the
remove_theme_mod
function?
Just noting that this seemed like a good idea, but turned out a bit more complicated, as there are a couple of scenarios where it returns null
:
- If the theme mod was not set.
- If it was the last remaining theme mod for the theme.
So adding a return value to remove_theme_mod()
could be explored in a new ticket if someone feels strongly about it :)
hellofromtonya commented on PR #529:
4 years ago
#6
Merged in changeset https://core.trac.wordpress.org/changeset/49214
https://core.trac.wordpress.org/ticket/51296