[theme-reviewers] (no subject)

Konstantin Obenland konstantin at obenland.it
Fri Jun 8 14:24:34 UTC 2012


Hm. I thought:

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 may optionally link the default stylesheet (style.css) directly in the document head, or via wp_enqueue_style() 

Konstantin

On 08.06.2012, at 16:18, Philip M. Hofer (Frumph) wrote:

> “is what is wrong” .. heh not what is required
>  
>  
> From: Philip M. Hofer (Frumph)
> Sent: Friday, June 08, 2012 7:16 AM
> To: theme-reviewers at lists.wordpress.org
> Subject: Re: [theme-reviewers] (no subject)
>  
> I’m not going to argue with “good practices”, not even sure why this gentlemen’s theme even enqueue’s the style.css to begin with and doesn’t just add it to the header.php like everyone else ;/
>  
> Enqueue’ing that style.css makes things sort of run ‘out of execution’ order.
>  
> Anyways, what was written is not what is the actual root of what is wrong.
>  
> “If incorporated into the Theme, site information is required to be called using the correct template tag:”
>  
> This is actually referring to the fact that enqueue’ing the stylesheet_uri is what is required, by not enqueing it and putting it in the appropriate location in the header.php.
>  
> However, what is written as a requirement is the difference between the get_stylesheet_directory_uri and get_stylesheet_uri
>  
> Hope this makes sense.
>  
> Theme’s Style.CSS should be called appropriately from the header.php and incorporated with the proper get_stylesheet_uri();
>  
>  
>  
> From: Konstantin Obenland
> Sent: Friday, June 08, 2012 7:07 AM
> To: theme-reviewers at lists.wordpress.org
> Subject: Re: [theme-reviewers] (no subject)
>  
> I wasn't aware.
>  
> This is what my finding was based on:
>  
> If incorporated into the Theme, site information is required to be called using the correct template tag:
> [...]
> Style Sheet URL: get_stylesheet_uri()
> 
> I was under the impression, when it is required to use get_stylesheet_uri() to get the stylesheet url, get_stylesheet_directory_uri() . '/style.css' actually is no good.
> Wasn't the reason behind requiring get_stylesheet_uri(), that the 'stylesheet_uri' filter gets called?
>  
> Konstantin
>  
> On 08.06.2012, at 16:01, Philip M. Hofer (Frumph) wrote:
> 
>> ^ thanks chip – also if you could:
>>  
>> might want to edit the doc for *_uri() / *_url()   .. although I don’t know any functions off the top of my head that have _url()
>>  
>>  
>> From: Chip Bennett
>> Sent: Friday, June 08, 2012 6:56 AM
>> To: theme-reviewers at lists.wordpress.org
>> Subject: Re: [theme-reviewers] (no subject)
>>  
>> I agree with Phil.
>>  
>> This statement is not in the Guidelines:
>>  
>> Site information is REQUIRED to be called using the correct template tag: get_stylesheet_uri() rather than get_stylesheet_directory_uri() . '/style.css'
>>  
>> What IS in the Guidelines is this:
>>  
>> Themes are required to use *_url() template tags, rather than bloginfo() equivalents.
>> AND
>> Themes are required to use get_stylesheet_directory() rather than STYLESHEETPATH to return the stylesheet path.
>>  
>> The important points:
>> Use get_stylesheet_directory() instead of the STYLESHEETPATH constant
>> Use get_stylesheet_directory*() instead of its get_bloginfo() equivalent
>> Use get_stylesheet_directory*() instead of get_template_directory*() when the included path is intended to be able to be overridden by a Child Theme
>>  
>> Chip
>> 
>> On Fri, Jun 8, 2012 at 8:44 AM, Philip M. Hofer (Frumph) <philip at frumph.net> wrote:
>> Okay this is a little bit out of hand.
>>  
>> ^ reference
>>  
>> Site information is REQUIRED to be called using the correct template tag: get_stylesheet_uri() rather than get_stylesheet_directory_uri() . '/style.css'
>>  
>>  
>> ^ Both are internal functions that do the EXACT same thing:
>>  
>> Case:
>>  
>> function get_stylesheet_uri() {
>>     $stylesheet_dir_uri = get_stylesheet_directory_uri();
>>     $stylesheet_uri = $stylesheet_dir_uri . '/style.css';
>>     return apply_filters('stylesheet_uri', $stylesheet_uri, $stylesheet_dir_uri);
>> }
>>  
>> This is not a reason to invalidate a theme.  Neither is adding remaining parameters on a completely valid function call.
>>  
>>  
>>  
>> From: George Mamadashvili
>> Sent: Friday, June 08, 2012 5:43 AM
>> To: theme-reviewers at lists.wordpress.org
>> Subject: Re: [theme-reviewers] (no subject)
>>  
>> Use more simple solution -  wp_enqueue_style( 'krakatau-style', get_stylesheet_uri() );
>>  
>> You need to use get_stylesheet_* functions when enqueueing style.css so child themes can easily override it.
>> 
>> On Fri, Jun 8, 2012 at 2:39 PM, hal-android <hasilent00 at gmail.com> wrote:
>> Hi.
>> Can anyone help me here?
>> I'm really confused about this.
>> In the previous ticket :
>> http://themes.trac.wordpress.org/ticket/8039
>> wp_register_style('default', get_stylesheet_directory_uri() .
>> '/style.css', array(), '0.0.3');
>> wp_enqueue_style('default');
>> 
>> 
>> And on this ticket I replace
>> http://themes.trac.wordpress.org/ticket/8069#comment:3
>> 
>> wp_enqueue_style('krakatau_style', get_template_directory_uri() .
>> '/style.css', array(), '0.0.5');
>> 
>> 
>> Please help me..what should i do?
>> 
>> Many thank's
>> amdhas
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>  
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>> 
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>> 
>>  
>>  
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
> 
>  
> 
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
> 
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20120608/2e982ed6/attachment-0001.htm>


More information about the theme-reviewers mailing list