[theme-reviewers] enqueuing style.css
Amy Hendrix
sabreuse at gmail.com
Fri Feb 3 17:13:19 UTC 2012
Either that reviewer was mistaken, or your acquaintance misunderstood
what they were told:
http://codex.wordpress.org/Theme_Review#Including_Stylesheets_and_Scripts
Themes may optionally link the default stylesheet (style.css) directly
in the document head, or via wp_enqueue_style()Themes are required to
enqueue all stylesheets and scripts, using
wp_enqueue_style()/wp_enqueue_script(), and hooked into an appropriate
hook via callback function, rather than hard-coding stylesheet/script
links or tags in the template.
Themes are recommended to hook stylesheet and script enqueue callbacks
into `wp_enqueue_scripts`
Themes may optionally link the default stylesheet (style.css) directly
in the document head, or via wp_enqueue_style()
On Fri, Feb 3, 2012 at 12:07 PM, Kirk Wight <kwight at kwight.ca> wrote:
> I met a fellow last night that said a theme reviewer told him style.css had
> to be linked directly in header.php, and couldn't be enqueued through
> wp_enqueue_scripts, like this:
>
> add_action('wp_enqueue_scripts', 'themeslug_enqueue_scripts_styles');
>
> function themeslug_enqueue_scripts_styles() {
> wp_enqueue_style( 'themeslug-styles', get_stylesheet_uri() );
> }
>
>
> Is this the case?..
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
More information about the theme-reviewers
mailing list