Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for WP core's custom-logo feature #295

Open
christophherr opened this issue Jun 28, 2018 · 2 comments
Open

Add support for WP core's custom-logo feature #295

christophherr opened this issue Jun 28, 2018 · 2 comments

Comments

@christophherr
Copy link
Member

Beans, being the progressive theme that it is, has been using a custom logo_uploader in the Customizer before WordPress core added the custom-logo theme support in 4.5.

If a child theme adds theme support for custom-logo, Beans is showing two image uploaders in close proximity and will only display the "beans_logo" (unless the child theme does some additional work).

It would be possible to add a backward compatible workaround allowing both features existence.
After a discussion with @hellofromtonya, it seems to make more sense to "port over/merge" existing "beans_logos" to the Core feature, remove the custom Beans solution and add theme support for custom-logo by default.

@hellofromtonya
Copy link
Contributor

@christophherr Let's target this one for v1.6 release. We want to give some thought, discussion, and a lot of testing to ensure it moves everyone forward without breaking anything.

I can't see why we'd want to have a beans_logo Customizer field these days when we could use the default custom-logo that is built into Customizer.

Therefore, I do think it's better to replace it out and use the default. That means we'll need to write code that does the swap upon upgrading or activation.

@christophherr
Copy link
Member Author

First pass at adding Core's custom-logo feature and 'migrating' existing beans_logos.
development...christophherr:custom-logo

  • Added theme support for custom-logo. Child theme's can 're-declare'/overwrite with dimensions, etc...
  • Removed the beans_logo_image section/control from the Customizer.
  • Changed the header fragment to use Core functions to output the custom-logo and added the existing Beans CSS class through a filter. The advantage is that WP automatically outputs all responsive image sizes.
  • Added a 'migration' function that basically works but the image/logo is not cropped to the correct size yet. (In other words, 'Change logo' in the Customizer has to be used to crop the image.)

@christophherr christophherr self-assigned this Sep 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants