Having a RESTful API in WordPress opens up options for WordPress developers and non-developers alike. Most of my articles on the REST API focus on using it to improve WordPress sites. But one equally exciting thing about having a RESTful API, which we haven’t discussed yet, is that it makes it easier than ever for developers who are not WordPress specialists to create the front-end for a site or app. And all can be done without disrupting the use of WordPress for content management. This should excite developers because, though WordPress shines as a content management system, PHP leaves much to […]
Is It Time for More Niche WordCamps?
One very useful thing I’ve come to understand about attending a WordCamp is the need to specialize, to find my niche. This is something that’s been emphasized time and time again at WordCamp sessions. Taking that excellent advice is a part of the reason that, when I go to a WordCamp, I attend very few talks, as very few of them apply to me. Of course, I’ve also learned that there is more to a WordCamp than just attending talks. The last WordCamp I went to, WordCamp DFW, I only went to one talk besides the keynote — an incredible speech by […]
Working with Taxonomies Using the JSON REST API
Update: For more information, you can download our free ebook, The Ultimate Guide to the WordPress REST API. Over the last few months I’ve provided a series of tutorials on how to use the WordPress REST API. I’ve covered topics on how to retrieve and create posts, and even how to work with post meta data and how to create a front-end post editor. And, because the term “post” is so broad, it applies to virtually any post type, and therefore covers a large swath of the REST APIs capabilities.. The two major data types I haven’t yet addressed are 1) taxonomies and 2) users. Today, […]
Improving Third-Party API Performance in WordPress with the WP-TLC-Transient Library
Minimizing page load time is incredibly important for both UX and SEO. We spend tons of time obsessing over getting our code and servers optimized to serve our sites as fast as possible, but once you incorporate data from external APIs, you may be putting your site’s load times at the mercy of an external server that you have no control over. Even under the best circumstances, site performance will generally still be an issue when getting data from third-party APIs, due to the additional time required to make extra HTTP requests. For these reasons, it’s important to leverage a caching system […]
Processing Forms with AJAX Using the JSON REST API
Update: For more information, you can download our free ebook, The Ultimate Guide to the WordPress REST API. In this article, I’m going to demonstrate how to write a simple plugin to create and edit posts using the JSON REST API. While this could be the basis of a cool, front-end editing plugin — with the addition of some fields and CSS, and the implementation of the TinyMCE or similar, of course — the point isn’t to reverse the engineering of the WordPress post editor, but rather to introduce you to processing form data using the REST API and AJAX. After you understand how […]
Improving WordPress Development Workflow with Composer
A dependency manager is one of those magical tools, like a smartphone, that most people (myself included) didn’t know they needed until they tried it, but once they did, they were hooked. A dependency manager wrangles together all of the different pieces that go into a plugin or theme — such as frameworks, JavaScript libraries, jQuery plugins, or even the plugins, themes, and libraries that makes up a WordPress site. There are lots of dependency managers out there, but the standard for PHP development is Composer. Composer is user friendly and works great with WordPress. Keep in mind that one […]
Working with Meta Data Using the JSON REST API
Update: For more information, you can download our free ebook, The Ultimate Guide to the WordPress REST API. In my previous articles on the JSON REST API, I focused primarily on retrieving and editing posts — both from the current site and from a remote site. In this article, I’m going to branch out a bit and focus on post meta. I’ll be covering how to edit and create meta fields using the API, and how to search for them. Before We Begin There are a lot of ways to add and edit custom fields — i.e., meta data — in WordPress. Though […]
The Importance Of Practicing Responsible Disclosure
Earlier this year, a security vulnerability in WordPress and Drupal was discovered by a member of Salesforce’s security team, Nir Goldshlager. Goldshlager co-authored an article on Mashable about the vulnerability, which Mashable waited to publish until after the issue was patched in WordPress and Drupal. This is a great example of responsible disclosure of a security vulnerability in open source software. The issue itself was reported in private to those who could fix it. It was kept a secret only long enough for the affected software to be patched. Now the exploit (and how to fix it) is available for developers […]
Introduction to the JSON REST API Part 2
Update: For more information, you can download our free ebook, The Ultimate Guide to the WordPress REST API In last week’s article, I showed just how easy it is to use the new WordPress REST API to get posts from a remote site. In this article we’re going to build on what we learned last week and use the REST API to copy posts from one site to another. First I’ll show you how to create a post in a site with data sourced from a remote site via the REST API. Then I’ll show you how to take a post […]
Introduction to the JSON REST API
Update: For more information, you can download our free ebook, The Ultimate Guide to the WordPress REST API In my article on the future of WordPress, I wrote about how the introduction of a JSON RESTful API to WordPress core will radically expand WordPress’s reach and capabilities. What is so exciting about this new REST API — which is currently available as a plugin, and slated to be included in WordPress 4.1 — is its ability to use it to not only display content from other WordPress sites, or even other applications entirely, but to save content from other sites, whether they are […]
7 Comments