-
Notifications
You must be signed in to change notification settings - Fork 1
Coding Conventions
Kyle Hotchkiss edited this page Feb 5, 2016
·
3 revisions
if ( $('.element').length ) {
// code here
}
- We should account for errors at any point in the code where things are likely to go wrong
- We should bubble errors back up end user gracefully. The process should never crash for most errors
- We should send the error to sentry
- Only use
try/catch
patterns if the parent library won't pass errors in callbacks.
Keep a space between brackets and variable names: {{ variable }}
not {{variable}}
-
When ACF ties fields to a page, it ties it to the numeric ID. This is fragile.
-
Users will often duplicate a page and run it off a different URL to try things out.
needs cite