[theme-reviewers] wp_enqueue_style for style.css?

Nicolas Kuttler theme-reviewers at nicolaskuttler.de
Sun Jul 11 10:18:28 UTC 2010

On Sun, Jul 11, 2010 at 05:22:02AM -0400, Andrew Nacin wrote:
> There are many solutions here. The child theme running on my site currently
> has this (and I manually bump it):
> add_action( 'stylesheet_uri', 'nacin_stylesheet_uri' );
> function nacin_stylesheet_uri( $uri ) {
>         return $uri . '?v=20100711';
> }

Hm, this looks ok to get the version info:

$theme  = get_theme( get_current_theme() );
$version= $theme['Version'];

Although I don't like that get_current_theme() has to loop through all themes. Wouldn't a get_bloginfo( 'template/stylesheet_version' ) be nice?

Anyway, I'm all for enqueuing the style.css, there just needs to be an advisable solution.


Nicolas Kuttler
wp at nkuttler.de

http://www.nicolaskuttler.de (deutsch)

More information about the theme-reviewers mailing list