[theme-reviewers] Prefixing Non-Global Variables
Edward Caissie
edward.caissie at gmail.com
Wed May 28 01:52:19 UTC 2014
$title in this case is a function parameter, and does not match any global
variables ... it also follows common practice for the function at hand. I
would accept it as is.
Edward Caissie
aka Cais.
On Tue, May 27, 2014 at 8:50 PM, Emil Uzelac <emil at uzelac.me> wrote:
> (*I haven't seen the ticket in question*)
>
> Not sure what difference would $counterpoint_title make.
> This is not a *deal breaker* and it could be accepted as-is.
>
> Em
>
>
> On Tue, May 27, 2014 at 7:15 PM, Evan Henley <henleyedition at gmail.com>wrote:
>
>> Hi all,
>>
>> This is regarding the following ticket:
>> https://themes.trac.wordpress.org/ticket/18381
>>
>> There is some conflict over the interpretation of the rules for prefixing
>> variables:
>>
>> Themes are required to use theme-slug ( or a reasonably unique slug) as a
>> prefix for anything in the public namespace, including all custom function
>> names, classes, hooks, public/global variables, database entries (Theme
>> options, post custom metadata, etc.)
>>
>>
>> I am being told I need to prefix every variable used in my theme. Is it
>> correct that even non-global variables need to be prefixed?
>>
>> For instance, I’m told that $title needs to be changed to
>> $counterpoint_title:
>>
>> function counterpoint_no_title($title) {
>> if ( $title == '' ) $title = __('Untitled', 'counterpoint');
>> return $title;
>> }
>> add_filter( 'the_title', 'counterpoint_no_title' );
>>
>>
>> Any insight would be much appreciated.
>>
>> Thanks,
>> Evan
>>
>> _______________________________________________
>> 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/20140527/61cd8f6d/attachment-0001.html>
More information about the theme-reviewers
mailing list