AMP Plugin Release v1.0-beta3

Update: v1.0-beta4 is available for beta testing. Last month we released the AMP plugin 1.0-beta2, just like the previous month we released 1.0-beta1, and today these are followed up with the 1.0-beta3 release. This version includes all work thus far for the v1.0 stable release. Active work is underway on an updated validation error workflow, which you … Continue reading AMP Plugin Release v1.0-beta3

AMP Plugin Release v1.0-beta2

Update: v1.0-beta4 is available for beta testing. It has been a month since AMP plugin v1.0-beta1 was released, and today this is followed up with the v1.0-beta2 release. What Changed Changes in this release include: Add ‘Enable AMP’ toggle in Gutenberg editor; it previously only appeared on in the classic editor. Also fix Gutenberg integrations due … Continue reading AMP Plugin Release v1.0-beta2

Speed Up PHPUnit Tests by Emptying Uploads Directory

tl;dr Periodically empty out the uploads directory in your WordPress dev environment to speed up PHPUnit tests. Over the past few months of working on the AMP plugin for WordPress, I’ve been noticing that PHPUnit has been running slower and slower over time. Well, today this frog jumped out of the boiling water: I decided … Continue reading Speed Up PHPUnit Tests by Emptying Uploads Directory

Ignoring files in a Git repo without touching .gitignore

Over several years now I’ve used Git in developing patches for WordPress core, for which we committers still use SVN to actually commit patches, for better or worse. While working on patches in a fork, however, Git is definitely for better. I’ve found a lot of value in using GitHub for reviewing and collaborating on … Continue reading Ignoring files in a Git repo without touching .gitignore

Previewing content changes across multiple site templates

A couple days ago Helen Hou-Sandí live tweeted her first time trying out Gutenberg, the feature plugin for the next generation WordPress editor. One of her tweets stood out to me and started a thread: tl;dr You can use the Customize Posts plugin to add and edit posts in the Customizer and preview your changes—to the title, … Continue reading Previewing content changes across multiple site templates

Defining “context” in the WP REST API

I got a question from a colleague last week regarding the context parameter in the WP REST API: In which cases would the request be a GET request but the context be edit? I was thinking that perhaps if an object is edited and a child is embedded, then maybe getting that child would be with … Continue reading Defining “context” in the WP REST API

Reducing command line args required for running PHPCS

When you run JSHint, the only thing you need to put on the command line is: jshint. No additional arguments are required to check JS files under the current directory, and it automatically looks for a .jshintrc file for its configuration. For years now when I’ve wanted to similarly run PHP_CodeSniffer to check the adherence of some PHP code against coding standards, … Continue reading Reducing command line args required for running PHPCS

Adding Meta Fields to a Widget Sidebar Section in the Customizer

On the Post Status Slack, an interesting question was raised by Richard Buff: Another customizer question: I’m trying to add a custom control that’s meant to customize the appearance of a specific widget area (like change the background color). Example: And I can do it, by passing the section id of that particular widget area (“sidebar-widgets-front-page-1”) … Continue reading Adding Meta Fields to a Widget Sidebar Section in the Customizer

Previewing Themes with Adaptive Designs in the Customizer

In WordPress 4.5 the customizer introduced device preview buttons for resizing the window to see what the theme looks like in desktop, tablet, and mobile (see #31195): This feature is specifically intended for themes that implement responsive web design (RWD) that applies the device-specific layouts via CSS media queries. Most themes should take this RWD … Continue reading Previewing Themes with Adaptive Designs in the Customizer