![]() ![]() Your indentation should always reflect logical structure. See Data Validation in the Codex for further details. Text that goes into attributes should be run through esc_attr() so that single or double quotes do not end the attribute value and invalidate the HTML and cause a security issue. You should almost never have to escape quotes in a string, because you can just alternate your quoting style, like so: If you’re not evaluating anything in the string, use single quotes. Use single and double quotes when appropriate. ![]() PHP # PHP Single and Double Quotes # Single and Double Quotes The guidelines are similar to Pear standards in many ways, but differ in some key respects. Keep the following points in mind when writing PHP code for WordPress, whether for core programming code, plugins, or themes. WordPress is working to gradually improve this by helping users maintain a consistent style so the code can become clean and easy to read at a glance. Some parts of the WordPress code structure for PHP markup are inconsistent in their style. Error Control Operator Don’t extract().Self-Explanatory Flag Values for Function Arguments.Only one object structure (class/interface/trait) should be declared per file. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |