THE PENDING DRAFT

WordPress Plugin – Airplane Mode

June 27, 2015

WordPress makes a whole bunch of connections when you are using the Dashboard. For example to fetch external files like fonts or to display the latest news and so forth. While this is convenient in most situations, it can completely slow you down or lead to error messages when you are on a slow/unstable connection or don’t have a connection at all, as we had this week. The solution to this is called Airplane Mode, a WordPress Plugin by Andrew Norcross which disables all external calls from WordPress.

Control loading of external files when developing locally. WP loads certain external files (fonts, Gravatar, etc.) and makes external HTTP calls. This isn’t usually an issue, unless you’re working in an evironment without a web connection. This plugin removes/unhooks those actions to reduce load time and avoid errors due to missing files.

GitHub – Airplane Mode

Sanitize Text Field with Multiple Lines in WordPress

June 26, 2015

I recently ran into a problem where we had a text field in a metabox, that was meant to be able to hold multiple paragraphs of text, but still be properly sanitized.

The text sanitization (sanitize_text_field) removes all tags, including line-breaks, so i had to find a workaround. This is the best solution i found:

$pdr_multiline_text = implode( "\n", array_map( 'sanitize_text_field', explode( "\n", $_POST['pdr_text_field'] ) ) );

Basically, what it does is breaking up the given string into smaller chunks on line-breaks (Implode on "\n"), then sanitize those smaller strings using sanizite_text_field() and then put them back together (explode on "\n").

Stackoverflow – How to sanitize multi-line text from a textarea without losing line breaks?

Xdebug with WordPress

June 24, 2015

Proper debugging and unit testing are both very high on my list of things i need to get my head around and implement into my development workflow as soon as possible. Luckily, there are people like Jonathan Christopher who wrote this great introduction on how to use Xdebug for WordPress Development.

He goes into great detail on how to install and configure Xdebug with MAMP (Pro) and use it with either a separate application or right inside an IDE.

Monday by Noon – Improving Your Process: WordPress Development Using Xdebug

Code Examples by WordPress Theme Review Team

June 18, 2015

The WordPress Theme Review Team released a library of code examples on GitHub. The first section is all about the Customizer and they plan to add more code snippets in the future. If you build themes and want them to meet the guidelines for the official WordPress.org Repository, you should definitely keep an eye on this.

GitHub – Code Examples

Pro Plugin Directory

June 14, 2015

Premium WordPress plugins have a price and are ineligible for the official plugin directory. Pro Plugin Directory is a place to discover premium WordPress plugins. 100% GPL.

A growing directory of Premium WordPress Plugins.

Pro Plugin Directory

Menu Customizer Plugin approved for 4.3

June 6, 2015

Last week it was announced that the Menu Customizer Feature Plugin was conditionally approved to be merged into core. A step which was quite controversial among developers. While we can have different views on whether the customizer is the right place or not, i think Carl Hancock nailed it when he said:

WordPress the open source project needs to decide what the future of the admin user interface is. It needs to pick a direction and it needs to go all in with it. This piecemeal approach of splitting up functionality between the Dashboard user interface and the Customizer user interface is an extremely poor direction to take from from both a user interface and user experience standpoint.

It’s not about whether we like or dislike the customizer at all or an “educational issue” as the plugin developer Nick Halsey has put it. The main problem is the UI fragmentation that comes with it and i think this should be addressed first, before it get’s merged into core.

WordPress Is Making The Same Mistakes Microsoft Did With Windows 8

Scott Bolinger on the WordPress Theme Business

June 2, 2015

Scott Bolinger on the challenges running a WordPress Theme Business, how it changed over time and about the differences between selling Themes, Plugins or a SaaS Product.

Keep in mind SaaS is not free money, it comes with lots of unique challenges. My experience with Reactor has been that SaaS is a more difficult business model in the short-term, but the revenue potential is higher long-term.

A very good read for anyone thinking about entering one of those markets.

The WordPress Theme Business, Then and Now