Add support for WP core's `custom-logo` feature
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.
@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.
First pass at adding Core's custom-logo feature and 'migrating' existing beans_logos.
https://github.com/Getbeans/Beans/compare/development...christophherr:custom-logo
- Added theme support for
custom-logo. Child theme's can 're-declare'/overwrite with dimensions, etc... - Removed the
beans_logo_imagesection/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.)