Warning message recommendation will cause PHP error
-
Hi,
I was running a plugin through this plugin checker and it produced a
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFoundwarning message for a variable. It seems the only way to satisfy/resolve this error warning is by prefixing the global variable name with the Text Domain specified in the plugin. The issue with this is that Text Domains are typically either a single word, or multiple words separated by hyphens. In my case, the Text Domain was set todisplay-page-template-name.If I update the variable name to be prefixed with the Text Domain, such as
$display-page-template-name_return_string, you end up with a PHP fatal error due to the hyphens.So at the moment, it doesn’t seem that you’re able to satisfy this requirement if your Text Domain is multiple words (separated by hyphens).
You must be logged in to reply to this topic.