You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/best-practices-asset-management.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ This allows the entire class and application interact programmatically with the
28
28
***This is a global namespace**. Be creative, be courteous, be concise, be clear and be defensive.
29
29
***Please don't use a postfix like `-js`, `-css`, `-script`, `-style`** -- WordPress will add postfixes when printing assets in the DOM, resulting in `something-js-js`. However, if a product is called purecss or momentjs, we then use the full slug with repetitive postfix, despite repetion (i.e. `purecss-css`)
30
30
***Try to keep parity between filename and dependency string**. This makes life easier and applications scale nicer.
31
-
***Plan for growth: avoid calling dependency "my-product.ext."** Use `-primary`, `-core` or `-main`prefix.
31
+
***Plan for growth: avoid calling dependency `my-product`** Use `-primary`, `-core` or `-main`postfix.
32
32
***Never use WordPress Filters or difficult-to-predict dynamic variables** so others may dequeue and register handles with confidence.
33
33
34
34
#### Leverage dependency chaining and the `array()` method for `wp_enqueue_*()`
0 commit comments