To sum up from the article,
PROS:
- Shortens dev. time
- more secured
- pretty coding
- widely supported
- trend (?!) - many people talk about it
CONS:
- Not for complex issue
- Not always necessary
- Not really a "native PHP" training
Rule of thumb: Tabs should be used at the beginning of the line for indentation, while spaces can be used mid-line for alignment.Comma of Array
Note the comma after the last array itemRegex
It’s most convenient to use single-quoted strings for regular expressionsEnd of Line / End of File
Remove trailing whitespace at the end of each line of code. Omitting the closing PHP tag at the end of a file is preferred.SQL Formatting
$wpdb->prepare()
is a method that handles escaping, quoting, and int-casting for SQL queries.
- “Fixes bug described in #20″
- “XYZ_Class test() method visibility to public to fix errors in #20″