#36330 closed enhancement (wontfix)
Function to get custom logo URL
| Reported by: | rabmalin | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Customize | Version: | 4.5 |
| Severity: | normal | Keywords: | needs-patch 2nd-opinion |
| Cc: | Focuses: | template |
Description
It seems that there is no function to get custom logo URL equivalent to get_site_icon_url. It would be great if we add such helper function.
Change History (10)
#1
@
11 years ago
- Component General → Customize
- Keywords needs-patch added
- Milestone Awaiting Review → Future Release
#3
in reply to: ↑ 2
;
follow-up:
↓ 10
@
11 years ago
Replying to obenland:
Can you expand on the need for a function like that?
I'm actually surprised we didn't introduce a get_custom_logo_url() helper, it seems like kind of a given for a new feature like this. I can absolutely see wanting to pull just the URL and not the full markup.
#4
@
11 years ago
If the URL alone is used to embed the logo then previewing the change will likely not work as expected because it is looking for an element with a certain class name to target for selective refresh.
#6
follow-up:
↓ 7
@
10 years ago
- Keywords 2nd-opinion added
- Version → 4.5
For the reason @westonruter mentions above, I think since we didn't introduce it with the feature, we shouldn't make this easy to do because it will break previewing. Jumping through the hoop of using get_theme_mod aligns with the need to also do custom work to make the customizer preview work.
#7
in reply to: ↑ 6
@
10 years ago
Replying to celloexpressions:
For the reason @westonruter mentions above, I think since we didn't introduce it with the feature, we shouldn't make this easy to do because it will break previewing. Jumping through the hoop of using
get_theme_modaligns with the need to also do custom work to make the customizer preview work.
Agree 100%. May be we can close this as wontfix. If anybody really want that then, its not that complex to achieve.
#10
in reply to: ↑ 3
@
10 years ago
Replying to DrewAPicture:
Replying to obenland:
Can you expand on the need for a function like that?
I'm actually surprised we didn't introduce a
get_custom_logo_url()helper, it seems like kind of a given for a new feature like this. I can absolutely see wanting to pull just the URL and not the full markup.
I'm surprised there isn't a get_custom_logo_url() helper too.
I want to use the custom logo as a background image. With the WP functions available to me, I'm unable to do this without duplicating code in the get_custom_logo() function.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Can you expand on the need for a function like that?