[theme-reviewers] Prefixing Non-Global Variables
Zulfikar Nore
zulfikarnore at live.com
Wed May 28 21:23:29 UTC 2014
I think it would be more constructive if you guys would first take a look at the ticket together with the issues raised and then comment in ticket either way. Commenting on the mailing list leaves issue in the air where neither the reviewer nor the author benefits and learn from your experience and knowledge :)
Date: Tue, 27 May 2014 21:47:48 -0500
From: otto at ottodestruct.com
To: theme-reviewers at lists.wordpress.org
Subject: Re: [theme-reviewers] Prefixing Non-Global Variables
No, because that's stupid.
Feel free to correct the reviewers when you think they are wrong. Theme review is a dialog, not a word handed down from up on high. Everybody makes mistakes. Don't judge, just try to achieve balance.
The goal is to produce the best code possible and to not give broken code users. Work towards that end, all around.
On May 27, 2014 7:16 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/20140528/ccb629a3/attachment.html>
More information about the theme-reviewers
mailing list