Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#36330 closed enhancement (wontfix)

Function to get custom logo URL

Reported by: rabmalin's profile rabmalin Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.5
Component: Customize Keywords: needs-patch 2nd-opinion
Focuses: template Cc:

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 @johnbillion
10 years ago

  • Component changed from General to Customize
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

#2 follow-up: @obenland
10 years ago

Can you expand on the need for a function like that?

#3 in reply to: ↑ 2 ; follow-up: @DrewAPicture
10 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 @westonruter
10 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.

#5 @chriscct7
10 years ago

  • Version trunk deleted

#6 follow-up: @celloexpressions
10 years ago

  • Keywords 2nd-opinion added
  • Version set to 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 @rabmalin
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_mod aligns 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.

#8 @rabmalin
10 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Closing based on above discussion.

#9 @netweb
10 years ago

  • Milestone Future Release deleted

#10 in reply to: ↑ 3 @NathanAtmoz
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.

Note: See TracTickets for help on using tickets.