spaces inside parenthesis

This is mostly just for readability. The semantics change before and after a parenthesis, and we are used to read spaces as word separators in western languages, so we can read such code faster. Another point is search: If you want to search for all changes on variables beginning with $post it is easier to … Read more

Translate a Constant while appeasing WordPress PHPCS

You cannot use constants or anything other than actual strings with translation functions. This is because the code that reads your code, and produces the translatable strings does not actually run your code, it is reading your code. Here is a more detailed post on the topic: http://ottopress.com/2012/internationalization-youre-probably-doing-it-wrong/ But the short version is this: This … Read more