Here’s a little bit of PHP that helps you to solve the Crocodile maths question. [Read more…]
I recently updated this site to WordPress 4.3 and immediately started receiving the following PHP Notice.
Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct()
How to prevent WordPress from attaching an unattached image to a post when you use
Insert into post.
Here’s a snippet of code that I wrote in response to a simple question from Ben Huson, posed on Twitter yesterday. [Read more…]
Q. Should I change my code back to using
dirname( __FILE__ ) instead of
A. No. I’m going to stick with
__DIR__ until someone complains.
I’ve had some performance issues on one of my sites. In this post I discuss some of the solutions to the problems; determining the cause, then applying the pragmatic fix. [Read more…]
If your instance of PHP Storm is saying it can’t find git.exe then there’s an easy way to fix it. [Read more…]
Last month a customer noted that the output of my Do-It-Yourself shortcodes plugin was interspersed with the share buttons from Add-To-Any. I reproduced the problem. I also discovered some strange behaviour with Jetpack. Today, while testing my fix I discovered another problem… Jetpack Related Posts attaches itself to the first invocation of ‘the_content’ filter. [Read more…]
The next question will demonstrate that you are really keen. Ask them to reproduce the bug on a-not-her machine
So no results, then this technique can often be your saviour Reduce the problem to the simplest showing bad behaviour
I recently upgraded my development environment to PHP 5.5.18 with Apache 2.4. Everything seemed to be working fine.
But when I tried to upgrade my bleeding edge WordPress environment to WordPress 4.1-beta2 it failed with.
Download failed.: There are no HTTP transports available which can complete the requested request.
I spent some time analysing the problem and found it to be that I hadn’t enabled CURL. But when I did enable CURL, it still didn’t work.
Looking at the number of reports in Stack Overflow this seems to have been a fairly common problem, with a variety of workarounds, many of which don’t actually address the basic issue. Here’s my solution. [Read more…]