[theme-reviewers] Prefixing Non-Global Variables
Evan Henley
henleyedition at gmail.com
Wed May 28 00:15:56 UTC 2014
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20140527/07074418/attachment.html>
More information about the theme-reviewers
mailing list