[theme-reviewers] (no subject)

Justin Tadlock justin at justintadlock.com
Fri Jun 8 16:28:40 UTC 2012


If using get_stylesheet_uri() is not a requirement, the wording "All 
template tags and hooks used in a Theme are required to be implemented 
properly" should be removed from the guidelines.  This is clearly a case 
where a template tag and hook are not implemented properly.

The end result is not the same.  One has the correct filters applied to 
it; the other does not.  Any plugin that filters 'stylesheet_uri' will 
not work unless the appropriate function is used.

On 6/8/2012 11:08 AM, Philip M. Hofer (Frumph) wrote:
> Justin, I know.  The reference of usage is a way that the information 
> is being used in the particular instance of code both can be utilized 
> to the same end.
> The method used in reference to the individuals theme utilized a 
> "enqueue" for  get_stylesheet_directory_uri().'/style.css' which in 
> itself is inappropriately written.   Since it will completely bypass 
> the main themes stylesheet.
> To the end result though both utilizations of the 
> get_stylesheet_directory_uri().'/style.css' and get_stylesheet_uri() 
> does the exact same thing as an end result.
> Regardless, either way could be utilized and neither is a 
> "requirement" for utilization in the guidelines at this moment, as per 
> the ticket saying it was.
> *From:* Justin Tadlock <mailto:justin at justintadlock.com>
> *Sent:* Friday, June 08, 2012 8:56 AM
> *To:* theme-reviewers at lists.wordpress.org 
> <mailto:theme-reviewers at lists.wordpress.org>
> *Subject:* Re: [theme-reviewers] (no subject)
> These two functions do not do the exact same thing.
>
> get_stylesheet_directory_uri() is for getting the directory URI to the 
> currently activated theme.
>
> get_stylesheet_uri() is for getting the URI to the current theme's 
> style.css file.  It is required for use under the guideline "All 
> template tags and hooks used in a Theme are required to be implemented 
> properly".  Reference:
> http://codex.wordpress.org/Theme_Review#Template_Tags_and_Hooks
>
> If a theme uses the this:
>
> get_stylesheet_directory_uri() . '/style.css'
>
> plugins that fire on the 'stylesheet_uri' hook will not work.
>
> get_stylesheet_uri() will output the appropriate file name and the 
> 'stylesheet_uri' hook will be available for plugin authors.
>
> On 6/8/2012 8:44 AM, Philip M. Hofer (Frumph) 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 <mailto:georgemamadashvili at gmail.com>
>> *Sent:* Friday, June 08, 2012 5:43 AM
>> *To:* theme-reviewers at lists.wordpress.org 
>> <mailto: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 
>> <mailto: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
>>     <mailto: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/f98b047c/attachment.htm>


More information about the theme-reviewers mailing list