How to Add WP-CLI Support to Any WordPress Plugin

Adjusting a plugin, to user’s needs is one of the main agendas every plugin owner has to follow. For a front-page slider that means more visual options. However, if you’re catering to developers, admins, and other power-users sooner or later, they’ll want CLI support. They’ll want to ditch the mouse and work only with the keyboard. Thanks to the WP-CLI project adding CLI support to your plugin is a piece of cake.

Read more

How to Rewrite a JavaScript Function into a jQuery Plugin

If you’re looking for an in-depth tutorial on writing a jQuery plugin, learning jQuery and JavaScript in general – this is not the article for you. There’s plenty of resources, both free and paid, covering those topics. What we’re exploring is a quick, real-world way of writing jQuery plugins that’ll help you in your day-to-day jQuery code. We won’t be writing code or plugins that get hosted on GitHub and used by thousands. We’ll write one-liners that speed up development.

Read more

How to Remove Default WordPress REST API Routes & Endpoints

WordPress REST API was introduced into the core in version 4.7 (Vaughan) in December 2016. Like any other significant change made on the WP core, it was fiercely debated (at the moment, July 2018, Gutenberg is the subject of such a debate/controversy). In the end, nothing happened. Those who didn’t care about the REST API still don’t care. Those who do care made some apps, integrations, plugins and other cool projects.

Read more

Rebranding reset-wp into WP Reset – The Story & Reasons Behind it

In May 2018 we acquired two plugins hosted in the WordPress repository – wp-reset and reset-wp (which will soon be removed from the repo, so don’t use it). The initial plan was to get only one, but in the end, we got both plugins which created some unique challenges. This is a story of how we merged two plugins, rebranded them and brought new life into them after years of sitting dormant in the repository.

Read more

How to Remove Default WordPress Rewrite Rules & Permalinks

WordPress permalinks, also known as rewrite rules or pretty links have been a feature since nearly the first version of WordPress. Once something to brag about, today this feature is as standard as features get and not even worth mentioning on the features list. Having numerous permalinks working out-of-the-box means that 99% of WordPress users don’t have anything to set up. However, there are situations where you want to remove or modify default permalinks.

Read more

How to Customize the wpdb Class and Add New Methods

The WordPress database abstraction layer, more commonly know as wpdb is a class based on ezSQL responsible for interacting with the database. The wpdb class is also a drop-in – a piece of core WP code that can easily be replaced by another piece of code with similar functionality. Extending and modifying wpdb is simple through the custom db.php drop-in file.

Read more