You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 23, 2018. It is now read-only.
to complete : attachment_id property is available if image is coming from media library. But some time images came from theme sub folder (as set in theme (function). A test must be done with this property.
The text was updated successfully, but these errors were encountered:
But some time images came from theme sub folder (as set in theme (function).
Why would the custom header image come from your theme folder? The custom header image should be chosen typically via the Customizer. If you are trying to force the header to use your image in a child theme then you'll have to accommodate for that. But that doesn't make this a bug -- unless I misunderstand you.
you are right it is not a bug but just a notice introduced by this new recent addition of attribute srcset. If child theme uses function register_default_headers (and provides default images), there no way to control attachment_id. Perhaps I need to rewrite header.php in child but it seems more elegant to test if id is set ! (for everybody).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
attribut srcset in header is not well implemented ! get_custom_header don't have property attachment_id !
Line number 93 of header.php - version 1.2
srcset="<?php echo esc_attr( wp_get_attachment_image_srcset( get_custom_header()->attachment_id ) ); ?>"
to complete : attachment_id property is available if image is coming from media library. But some time images came from theme sub folder (as set in theme (function). A test must be done with this property.
The text was updated successfully, but these errors were encountered: