Welcome to ManageWP.org

Register to share, discuss and vote for the best WordPress stories every day, find new ideas and inspiration for your business and network with other members of the WordPress community. Join the #1 WordPress news community!

×

7 min read Jonathan Wold
Development | make.xwp.co | Mar. 10, 2016

Running PHPUnit Tests Outside VVV

Ideas for improving workflow and encouraging more PHPUnit test writing.

Running PHPUnit Tests Outside VVV

Development | make.xwp.co | Mar. 10, 2016

We use Varying Vagrant Vagrants (VVV) as the development environment for as many projects as we can. It provides a great foundation not only for developing client projects but also for core development itself. One great thing about VVV is that it installs all of the tools needed to run the core unit tests right out of the box. Our wp-dev-lib project has a PHPUnit plugin bootstrap that makes use of the core unit tests as installed by VVV, and we have a pre-commit hook which can run the plugin PHPUnit tests inside the VM even when making a commit from outside (on the host machine). This ability to run PHPUnit tests inside the VM makes it easy for getting developers quickly set up to run PHPUnit tests, and it’s also something that is suggested for core’s PHPUnit Grunt task (#36190).
Nevertheless…
Tests running outside of the VM are a fast and happy place.
— Jeremy Felt (@jeremyfelt) March 10, 2016
Even though VVV lets you run core’s PHPUnit tests right out of the box, the tests can run more slowly in the box. If you have a pre-commit hook that runs unit tests with each commit, your workflow can be really slowed down (especially since the tests should eventually by run by Travis CI after

3 min read Jonathan Wold
Development | make.xwp.co | Dec. 3, 2015

Musings on Customizer as Future Admin Interface

Weston Ruter offers his thoughts on the Customizer as a future frontend-focused admin interface.

Musings on Customizer as Future Admin Interface

Development | make.xwp.co | Dec. 3, 2015

There has been a lot of (well-deserved) excitement over Automattic’s Calypso project which largely re-implements the WP admin on WordPress.com as a JavaScript-driven REST API-powered single page application. (Reminder: WordPress.com is a service of Automattic that is built on the WordPress project, which I’ll call “WordPress.org” to differentiate here.) It is great to see what is possible when JavaScript leveraged in this way with the REST API. The improvements to speed and overall user experience are much improved in the new WordPress.com admin interface. Calypso does not yet have a plugin architecture for extensions, but even when it does, it will be completely incompatible with all existing WordPress plugins that integrate with the WP admin. This works for WordPress.com because it doesn’t support arbitrary plugins and so they have a fixed feature set that they have to account for. This is not the case for WordPress.org, so unfortunately there is no easy path toward adopting Calypso as the next-generation admin interface for WordPress.org.
How can we bring WordPress.org forward to feature a next-generation JavaScript-driven REST API-powered single page application (SPA) admin interface

7 min read Jonathan Wold
Development | make.xwp.co | Apr. 21, 2016

Running PHPUnit tests with VVV and PhpStorm

A guide to setting up the PHP interpreter and configuring PHPUnit settings.

Running PHPUnit tests with VVV and PhpStorm

Development | make.xwp.co | Apr. 21, 2016

PhpStorm has excellent out of the box support for running unit tests using the PHPUnit testing framework. It also provides you with great code coverage statistics of your unit tests. The challenge however is getting it setup properly and actually running your WordPress unit tests. On my local development environment, I specifically use VVV and ideally I wanted PhpStorm to run the tests from within the VVV virtual machine. Since PHP and PHPUnit are bundled with VVV, it makes sense to have PhpStorm utilise those libraries inside the virtual machine than for me to have to install the libraries independently on my Mac. I love having clear separation between my computer and development environments.
There is a downside to running your tests from inside a VVV virtual machine and that is that it can be a bit slower. This is because there is extra overhead involved with the communication over a SSH connection between your host machine and the guest/virtual machine. The virtual machine also does not have the same computing power as your host machine. The good news is that I’ve found that even though there is a slight reduction in speed, it’s fast enough that it’s not of concern to me.
Initially

3 min read Jonathan Wold
Development | make.xwp.co | Apr. 29, 2016

Customize Posts v0.5 Released

A major update focused on content editing within the Customizer.

Customize Posts v0.5 Released

Development | make.xwp.co | Apr. 29, 2016

We’re pleased to announce the v0.5 release of the Customize Posts plugin! Check out my rough release demo video: Key features in this release:
Postmeta support
A framework for registering postmeta types, adding controls, and previewing changes.
Page template
Changes to the page template can now be previewed, both in the Customizer and from the edit page admin screen. The Customizer now opens when clicking “Preview Changes” to preview the page. Further edits can be made from the page template control in this Customizer page preview, and the changes get synced back to the page template dropdown in the page attributes metabox on the edit page screen.
Featured image
Similarly to the page template, changes to the featured image can now be previewed where normally this is not possible in WordPress. The featured image selection on edit post screen has been improved to not update featured image in place, instead waiting until the post is saved before updating the featured image postmeta. The featured image can be set from the post edit screen and then previewed in the Customizer via the post Preview Changes button: the featured image can be further changed in the Customizer post preview, with

10 min read Jonathan Wold
Development | make.xwp.co | Jan. 6, 2016

Bridging the Customizer and the WP REST API

An introduction, overview, and preview of the Customize REST Resources plugin.

Bridging the Customizer and the WP REST API

Development | make.xwp.co | Jan. 6, 2016

There’s a lot of excitement in the WordPress community about the REST API. We’ll be sending a couple representatives to the Day of REST conference coming up at the end of January, and I’ve been long-overdue to do a deep-dive in to the REST API: preparing for the conference is a great excuse. With a couple weeks off over the holidays, I took the opportunity to build something with the REST API. Naturally with the parallel excitement (and mandate) for JavaScript, I wanted to build something for WordPress’s single page application: the Customizer. Inspired in part by Daniel Bachhuber’s A more RESTful WP-CLI project, I set out to make a more RESTful Customizer and came up with the Customize REST Resources plugin. A more RESTful WP-CLI seeks “unlock the potential of the WP REST API at the command line” in that “all WP REST API endpoints registered via plugins and themes will automagically be usable as WP-CLI commands”. In the same way, Customize REST Resources begins to unlock the potential of the WP REST API in the Customizer by automatically creating settings and controls for all REST resources that are used on a given page. In this way, anything developed for the REST API should automatically

10 min read Ahmad Awais
Development | make.xwp.co | Jul. 5, 2016

Streamlining Contributions to WordPress Core via GitHub

XML-RPC is now enabled for all Trac users, per Dev Chat Notes: June 29, 2016.

Streamlining Contributions to WordPress Core via GitHub

Development | make.xwp.co | Jul. 5, 2016

In Contributing to WordPress Core via GitHub, I detailed the somewhat-tedious workflow that I’ve been using for developing and collaborating on patches that get manually uploaded to Trac. Now that the topic of using GitHub for Core contributions is again up for discussion at the WordPress Community Summit, I wanted to jot down some ideas for how to automate the workflow I’ve been using; I’ll be looking specifically at what a streamlined workflow for contributions looks like via a GitHub fork of the WordPress repo managed by a component maintainer, such as our XWP clone. (For how to set up a GitHub clone of develop.git.wordpress.org, see my previous post.) Caveat: This is intended for users in trusted contributor teams as it requires the user to open an internal (intra-repo) pull request from feature branch to master. It will not work when opening a pull request from a fork due to Travis CI’s security restrictions on environment variables. So any pull requests from external contributors will need to be manually applied to a feature branch by a repo contributor and then open an intra-repo pull request (while closing the original inter-repo pull request).
I’ll

9 min read Jonathan Wold
Development | make.xwp.co | Aug. 31, 2016

Integrating AMP into WordPress: A Comprehensive Guide

A comprehensive write-up on the what, why, and how of Google's AMP.

Integrating AMP into WordPress: A Comprehensive Guide

Development | make.xwp.co | Aug. 31, 2016

AMP is an emerging technology that’s gaining the attention of online marketers in all fields. It formats content in a way that loads blazingly fast for mobile visitors, whose page load time expectations can be as little as three seconds. Abraham Lincoln has no patience for bad UX.
I recently worked with a client who wanted to improve their page load times by integrating the AMP project into their existing WordPress site. This was a great opportunity for me to expand my toolset, as well as learn something that I can now share with you.
Below you’ll find (perhaps too much) information to get you rolling with AMP, as well as many code samples to help you include AMP in your WordPress projects.
Contents
What is AMP?
AMP stands for “Accelerated Mobile Pages.” It is an Open Source project backed by Google that makes web pages load really, really fast. These pages are cached and served by Google itself, receive it’s “Mobile-friendly” label in search results, and can even increase Search PageRank for these pages.
After all of the advances that have been made over the last 25 years to give users a rich web experience, AMP takes a huge step backward toward

7 min read Jonathan Wold
Community | make.xwp.co | Jan. 18, 2017

How you can contribute to WordPress (yes,

Jeff Paul, a deputy release lead for WordPress 4.7, offers a bunch of ideas for ways you can begin contributing to WordPress.

How you can contribute to WordPress (yes,

Community | make.xwp.co | Jan. 18, 2017

Me: Do you regularly use WordPress? You: Yes, I love it, it’s fantastic!
Me: Have you ever thought about helping contribute to WordPress?
You: No, I am not a developer.
Me: Well, good news, you do not have to be!
You: Ok, tell me more…
Whether you have considered it or not, I am so certain that you CAN contribute to WordPress that I will personally offer to help you find a way to do so. I will outline some options below, but feel free to reach out to me directly and I promise to help!
But first, a little background on me…
I graduated from college in 2001 with a degree in Computer Science, but have not spent any significant time coding since then. I have held roles in project management, product management, and team and customer management. The way I tell it, no one would realistically hire me these days to do development. And yet, there has been a fantastic opportunity for me to help contribute to WordPress as a deputy release lead on WordPress 4.7. While this was a significant time commitment for me, there are ways you can contribute with minimal time commitment.
Now let us focus on how you could contribute…
I am going to give you some options to describe