WordPress
-
use() is one of the more obscure functions from the @wordpress/data package, mainly because it lacks proper documentation and examples illustrating its usage. By “lacking” I mean the official documentation only has a cryptic two-liner definition for it: Extends a registry to inherit functionality provided by a given plugin. A plugin is an object with…
-

Much has changed since my last article on how to get WPCS up and running in VS Code, the most notable being the release of WPCS 3.0 which makes it easier to register new coding standards; I’ve also recently switched to using the PHP Sniffer & Beautifier VS Code extension which is a nice replacement…
-

Note: Here’s a more updated and simple guide. Adhering to a certain set of coding standards is important when it comes to writing good quality code. It makes your code easier to maintain and read not only for yourself but other developers as well. WordPress has its own set of coding standards and it is…
-
If you just started using the Basic Auth plugin for authentication, you might come across issues like 401 (unauthorized) that prevents you from making authenticated requests, even though your code and credentials are correct. Here are two possible solutions to that: 1. Tweak .htaccess fileOpen up the .htaccess file and add the following lines: The…
-
Recently, I have been working on this React project that allows users to upload some documents which will be tagged to their profile. My initial thought was to figure out how to use the WP REST API to upload to the Media Library. After that’s done, I would need to save the URL of the…
-
At the Contributor’s Day of WordCamp Singapore 2019, I ran a workshop on how to build a simple CRUD app using the WP REST API. Unfortunately, due to time constraint, I didn’t manage to explain the source code as much as I would like to. So the purpose of this series of posts is to…
-
Back in June, at a local WordPress Meet-up, I gave an introduction on the WP REST API and also ran a little demo. That was my first ever presentation so I was definitely feeling nervous but also excited at the same time! Excited because it’s one of my favorite topics when it comes to WP…
