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.
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
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.
— Jon Atack (@jonatack) June 20, 2015
A tweet storm by Jason Calacanis. I especially like #5:
5/Teach everyone around you everything you’ve learned, then go find more knowledge to give away! Now you’re acting like a CEO/founder.
These two companies are very much alike—the Glimmer Twins of our appy times. And, like any set of twins, if you look closely you start to see the differences.
An interesting read by Om Malik in The New Yorker comparing Apple and Google.
WP Rocket reminds us that we should never forget to measure the actual Page Speed results when optimizing a page, instead of only trusting the grades we get from tools like Google Page Speed Insights.
Do not blindly trust Google PageSpeed or take it at face value.
I couldn’t agree more on that one!
In addition to all of the “good goods” that they produced, the Eameses were prolific as educators, making many important contributions to the world of ideas.
Underlying all of their work is the principle that design should not be an act of creative self-expression but rather a process of problem solving.
Great article on brainpickings about Charles and Ray Eames. Now i want to read “an eames anthology” even more.
WPMUDEV has an interesting post about the History of WordPress Security. It’s also a good reminder to read through the WordPress.org Security white paper.