Make WordPress Core

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

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

  • Component General → Customize
  • Keywords needs-patch added
  • Milestone Awaiting Review → Future Release

#2 follow-up: @obenland
11 years ago

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

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

#5 @chriscct7
11 years ago

  • Version trunk

#6 follow-up: @celloexpressions
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 @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 → wontfix
  • Status new → closed

Closing based on above discussion.

#9 @netweb
10 years ago

  • Milestone Future Release

#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.