Nip over to Otto’s blog and read his post entitled don’t include wp-load, please which I’m in complete and total agreement with. I’d like to add to the solutions with the following method of adding data to your page for use by your plugin’s JavaScript: wp_localize_script.
Author Archives: simonwheatley
Taking stock
I have a client with a lot lot lot lot of WordPress sites, and I’m helping them craft a strategy for dealing with WordPress throughout their business. One thing we wanted to do was to take stock of all the plugins they have installed on all their sites, work out how many are in common, …
Eeek! The load-page-new.php and load-page.php actions have vanished!
So WordPress 3.0 is out, and some of the useful admin area load-* hooks that I use have vanished or changed. To refresh your memory, there are individual and specific hooks which run whenever WordPress loads an admin page. These hooks are named after the PHP file in the URL to the admin page, for …
Continue reading “Eeek! The load-page-new.php and load-page.php actions have vanished!”
Live text streams for the National Care Service
We were approached by the Department of Health to further enhance their WordPress based website for the launch of the National Care Service. The launch was to have a live web video stream and The Department of Health wanted live text updates to accompany the video. The text updates would allow late comers to catch up, …
Continue reading “Live text streams for the National Care Service”
Thickboxing in WordPress themes
The lovely Thickbox jQuery plugin appears to no longer be supported by it’s creator, Cody Lindley, but it’s included with WordPress (it provides the “popup” overlays in the post editor for uploading and inserting images and other media), very flexible and that’s good enough reason for me to use it for the time being. I’ve …
Ordering post meta value, numerically
I have a client who wants to show a list of their posts ordered by the numerical value of a post meta field (custom fields are referred to as post meta data in the WordPress code, so I’ll be following that convention from now on). Unfortunately there doesn’t seem to be a way to do …
Problem with a PHP fatal error when saving WP profile
This bug has been around for a little while now, and one of my clients has it bad as they cannot save user profiles without patches to WP core. (Unfortunately although WordPress Trac has tickets (#9640, #7540) the discussion over how the problem needs to be fixed has been going on for a couple of …
Continue reading “Problem with a PHP fatal error when saving WP profile”
Fix users with no role – data migration plugin
So you’ve migrated a bunch of users over from another system and then, horror, you discover that they don’t have roles in WordPress. The WP Users admin screen doesn’t cope with this issue (why should it), so the only option would be to go through and manually select the roles for each user with no …
Continue reading “Fix users with no role – data migration plugin”
Migration to bbPress – fix topic slugs
So I’ve just had to migrate a whole load of data to bbPress, and unfortunately the fairly old migration tool I was using (while generally excellent) didn’t bring across the topic-slugs, meaning I couldn’t have pretty permalinks in bbPress. So I’ve written a quick plugin which creates the topic slugs, it does this by doing …
Installing ImageMagick on MacPorts and imagick on PECL
Over the last few hours I’ve installed ImageMagick on MacPorts (super easy), and imagick on PECL (not so much). Xentek‘s post on ImageMagick and imagick was a great help, and got me past the first brick wall I hit (passing in the ImageMagick prefix to prevent it complaining about Wand-config)… but then I couldn’t get …
Continue reading “Installing ImageMagick on MacPorts and imagick on PECL”