GitHub for Atom

JavaScript Coding Standards

JavaScript has become a critical component in developing WordPress-based applications (themes and plugins) as well as WordPress core. Standards are needed for formatting and styling JavaScript code to maintain the same code consistency as the WordPress standards provide for core PHP, HTML, and CSS code.

The WordPress JavaScript Coding Standards are adapted from the jQuery JavaScript Style Guide. Our standard differs from the jQuery guidelines in the following ways:

GitHub for Atom
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

Many of the examples below have been adapted directly from the jQuery style guide; these differences have all been integrated into the examples on this page. Any of the below standards and examples should be considered best practice for WordPress code, unless explicitly noted as anti-patterns.


Warning: Undefined variable $post_id in /home/fatguyon/domains/fatguyonbike.com/public_html/wp-content/themes/framework/functions.php on line 247

Warning: Undefined variable $args in /home/fatguyon/domains/fatguyonbike.com/public_html/wp-content/themes/framework/functions.php on line 267

Warning: Undefined variable $post_id in /home/fatguyon/domains/fatguyonbike.com/public_html/wp-content/themes/framework/functions.php on line 305

Warning: Undefined variable $fields in /home/fatguyon/domains/fatguyonbike.com/public_html/wp-content/themes/framework/functions.php on line 337

Warning: Undefined variable $post_id in /home/fatguyon/domains/fatguyonbike.com/public_html/wp-content/themes/framework/functions.php on line 247

Warning: Undefined variable $args in /home/fatguyon/domains/fatguyonbike.com/public_html/wp-content/themes/framework/functions.php on line 267

Leave a Reply

Your email address will not be published. Required fields are marked *