Stop Indexing All PHP Files in PHP CodeSniffer

If you’re working with PHP CodeSniffer in your WordPress project, then you’re likely familiar with how much time it takes to complete indexing all PHP files.

You start up your IDE, configure PHPCS, point it to your set of WordPress rules, and then wait for it to begin doing its job. Don’t get me wrong: I love having it sniff the code while writing it, but it also takes a bit of time for it to finish parsing it.

Indexing All PHP Files
Stop PHPCS From Indexing All PHP Files.

Granted, this is true of likely any PHP-based project, but how many of those do I write about here? 🙂

Continue reading “Stop Indexing All PHP Files in PHP CodeSniffer”

Updating Atom and the WordPress Coding Standards

For those who have read my Atom and WordPress Coding Standards post, then you should have everything you need when it comes to setting up the editor to evaluate your code with the WordPress Coding Standards.

Recently, though, the 0.10.0 release of the coding standards were published on GitHub, and it brings a lot of changes.

Atom and the WordPress Coding Standards

If you’re looking to begin upgrading to this new change, there’re a few caveats that you may experience when working with Atom and the WordPress Coding Standards.

They’re easy to address, though.

Continue reading “Updating Atom and the WordPress Coding Standards”

Custom Data Validation in WordPress

Custom data validation in WordPress is something that many who have built custom solutions for others have likely used.

In fact, anyone who has made a theme or a plugin has probably used some form of data validation even if it’s just escaping some attribute that will be part of the rendered markup.

Custom Data Validation

This is a major step in making sure that anything you’re creating is securely managing information coming from the database.

But whenever you’re working on a custom solution that requires you use various elements and attributes, how can you specify only the supported attributes?

Continue reading “Custom Data Validation in WordPress”