WP-CLI is a great tool which we use heavily at Seravo and if you are a developer we hope you do too. Version 2.3 is a smaller release but with some nifty improvements and we actually also participated with a contribution to make comparisons between cross-platform
wp i18n makepot creations much better.
New command ‘media fix-orientation’
Maybe you have noticed that images that look OK on your camera or smartphone don’t have the correct orientation when uploaded to WordPress. This is because the orientation is set as EXIF data which is not being respected when uploaded to WordPress. Of course, this is something that would be nice to have solved in the WordPress core and there is in fact a 9-year-old Trac ticket that is being worked on. Until this is solved there is now a new command
media fix-orientation that reads these special tags and properly applies them to your images.
Wildcard support to `–skip-tables` parameter
search-replace is probably a command you use quite often, and it now has a new additional feature. The flag
--skip-tables can now use wildcards to skip a group of tables which can be useful for example when you want to skip tables of a plugin that begin with a prefix.
Better comparisons with ‘wp i18n
We develop and maintain our own sites at Seravo. An issue was created on July 12th in one of our private GitHub repositories with the title “Investigate
After some investigation it became clear that the reason for this is that the command
wp i18n makepot relies on the order the files are returned by the filesystem, and different filesystem implementations on the different operating systems of developers return the files in an arbitrary order.
My colleague Leo set up an issue about this in the WP-CLI repository and later also provided a pull request including the relatively small change to solve the issue with an accompanied test that verified the implementation. Within a couple of weeks, it went from an issue in our internal GitHub repo to a merged pull request and a part of the v2.3 release – a great example of how open source should work.
Available for all Seravo customers
We have already started rolling out this to all our customers and the new version is, of course, the default on all new installs. If you are curious about other developer tools that are available, please read more from our WordPress Developer Documentation.