PHP – Christopher Murtagh https://philoxopher.com Ponderer, feminist, musician and dad. Sun, 10 Aug 2025 21:44:24 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.3 Back from my social ‘vacation’ https://philoxopher.com/2012/04/04/back-from-my-social-vacation/ Wed, 04 Apr 2012 16:42:31 +0000 http://christopher.murtagh.name/?p=165 It’s been a while since I posted anything here, I blame winter plus a host of all sorts of things that have been keeping me busy. Since the last blog post, there have been a number of things. Delano and I released One-Time Secret, along with Ruby, PHP and (thanks to Kyle Dawkins) Perl client libraries for using the API. OTS was a bit of distraction from our work on Blame Stella, but rest assured that work on Blame Stella 2.0 is still under way. We should have news on both of these projects in the near future.

In this time, I did write a couple of blog posts for One-Time Secret. If you haven’t seen them, they’re here:

I’ve got a bunch of exciting new things on the horizon that I can’t announce yet, but will in the very near future.

]]> SimpleRSSEmbed – my first WordPress plugin https://philoxopher.com/2011/12/12/simplerssembed-my-first-plugin/ Mon, 12 Dec 2011 09:49:41 +0000 http://christopher.murtagh.name/?p=137 Ok, I’ve been doing all sorts of things with WordPress for a while now, but oddly enough, I never actually wrote a plugin (although, in retrospect, I did a lot of template hacks that probably would have been easier to do as plugins). Anyway, I needed a plugin for a blog I was working on that would allow me to display the summary of N number of blog posts from another blog. There seem to be plenty of existing plugins that do this, however most of them are either horrible code (both HTML and PHP), or they don’t work with Atom feeds that don’t have descriptions. I wanted something very simple, with very clean output that would ‘just work’™. So, after trying about a dozen of them, I decided to just write my own (which turned out to be insanely easy). If I would have started down that path at first, I probably would have been done sooner.

So, if anyone is interested in this very simple plugin, here it is. Of course, it’s GPL. I expect I’ll be adding more features to it as I need, but for now this does exactly what I want with very little code to maintain.

Documentation

Download

You can get the current version from here: simplerssembed.zip

Installation

Put the contents of simpleressembed.zip into your wp-contents/plugins directory, and unzip it. This should give you a directory called ‘simpleressembed’ which has 3 things in it:

  • an empty directory called ‘cache’
  • a file called readme.txt
  • a file called simplerssembed.php

Make sure that the cache directory is writeable by your web server, or whatever user that will be executing the php scripts. The safest way (on *nix system) is to do the following (assuming that the process runs as the user ‘apache’:

[root@ simplerssembed]# chown apache: cache
[root@ simplerssembed]# chmod 755 cache

Then go to the plugins tool in your WP dashboard, and activate the plugin.

Using the plugin

Once the plugin is activated, you can embed RSS feeds with the following shortcode:

[simplerssembed rssfeed='http://wordpress.org/news/feed/'
rssitems='5' rsscssclass="rssfeeditem"
rssdateformat="j F Y" rsslinktarget="_new"]

Parameters

The currently defined parameters are as follows:

rssfeed -> URI of the RSS feed
rssitems -> The number of items to display
rssmaxdescription -> The maximum number of summary characters to display
rsscssclass -> The class name to give the containing <div> (per item)
rsslinktarget -> The target attribute for the link to the post
rsscacheduration -> The duration (in seconds) of the cache
rssdateformat -> The data format (see PHP's date function)

Default values

The default values for the above parameters are:

rssfeed => 'http://wordpress.org/news/feed/'
rssitems => '5'
rssmaxdescription => '400'
rsscssclass => 'rssitem'
rsslinktarget => '_self'
rsscacheduration => '3600'
rssdateformat => 'j F Y | g:i a'

Example output:

This is output from the actual code above:

WordPress 6.9.4 Release

WordPress 6.9.4 is now available! WordPress 6.9.2 and WordPress 6.9.3 were released yesterday, addressing 10 security issues and a bug that affected template file loading on a limited number of sites. The WordPress Security Team has discovered that not all of the security fixes were fully applied, therefore 6.9.4 has been released containing the necessary […]

Posted on 11 March 2026

Your Browser Becomes Your WordPress

For nearly two decades, WordPress has been known for a simple, powerful idea: that anyone should be able to get online and start creating with minimal friction. The famous five-minute install captured that spirit for an earlier era of the web. Today, we’re introducing my.WordPress.net, a new take on that idea designed for a new […]

Posted on 11 March 2026

WordPress 6.9.3 and 7.0 beta 4

WordPress 6.9.2 was released earlier today and addressed 10 security issues. A few users have subsequently reported an issue where the front end of their site was appearing blank after updating to 6.9.2. The issue has been narrowed down to some themes using an unusual approach to loading template files via “stringable objects” instead of […]

Posted on 10 March 2026

WordPress 6.9.2 Release

WordPress 6.9.2 is now available! This is a security release that features several fixes. Because this is a security release, it is recommended that you update your sites immediately. You can download WordPress 6.9.2 from WordPress.org, or visit your WordPress Dashboard, click “Updates”, and then click “Update Now”. If you have sites that support automatic […]

Posted on 10 March 2026

WordPress 7.0 Beta 3

WordPress 7.0 Beta 3 is available for download and testing! This beta version of the WordPress software is still under development. Please do not install, run, or test this version of WordPress on production or mission-critical websites. Instead, you should evaluate Beta 3 on a test server and site.WordPress 7.0 Beta 3 can be tested […]

Posted on 5 March 2026

]]>