Hi dpete,
Thanks. I’ve identified a possible situation where WordPress will output styles to the footer when using wp_enqueue_style due to when it’s initiated – as of WordPress 3.3, this appears to be intentional. Unfortunately, unlike JavaScript WordPress doesn’t provide a method of forcing stylesheets to be added to a specific location. As the content area is processed well after the pages head, it’s too late to reliably conditionally load the widgets stylesheet (which is what register_front_styles does – it registers the style and then enqueues it when rendered).
If you would like for the stylesheet to always be output in the head, your best bet would be to output the stylesheet immediately when initializing the widget using wp_enqueue_style
instead of register_front_style (which will conditionally load the stylesheet and thus potentially have it appear in the footer), or use a performance plugin that moves any stylesheets added to the footer – most performance plugins do this so I recommend checking if any existing plugin you’re using does this.
Kind regards,
Alex