20,227 reputation
32562
bio website stephenharris.info
location Edinburgh, United Kingdom
age 26
visits member for 3 years, 3 months
seen 7 hours ago

Mathematics PhD student at the University of Edinburgh with a (geeky) passion for anything coding related.

I develop WordPress plugins, including the event management plugin, Event Organiser. I also write for Wptuts+

Github | Twitter


Jan
12
awarded  Good Answer
Jan
11
revised Will placing custom templates in sub directory break any native WordPress functionality
Added line to emphasize the 'fix' for the problem.
Jan
11
comment How to install bootstrap in child theme
@Digitaldervish have you de-registered the original stylesheets first?
Jan
2
comment What is the most efficient way of implementing a favorite post system?
If going down the post meta route you may need to do a bit of de-normalisation and store the number of favourites too. I'm assuming you'll probably want to sort posts, and you can't sorting on serialised data. Or if each user ID is a separate entry in the post meta table you could use that as the basis of the sort (but that would require some custom SQL as I don't think WordPress handles that type of sort).
Dec
30
awarded  Enlightened
Dec
29
awarded  Nice Answer
Dec
29
comment Sanitize slug title
Oops, changed the wrong number. Priority is the first number (was 10, now 5) in the add_filter call. Lower the number the earlier it is called.
Dec
29
revised Sanitize slug title
deleted 1 character in body
Dec
29
comment Sanitize slug title
@Sebastian - see update, I changed the priority as WP has a callback attached to remove spaces and replace them with dashes. This was probably running after that so 'loosing' those changes'. R.e. uppercase, I have no idea - sanitize_title() doesn't lowercase anything, so the problem probably lies elsewhere.
Dec
29
revised Sanitize slug title
edited body
Dec
26
comment How to add add more properties to WP_Post object in search results loop
It's a class method: github.com/WordPress/WordPress/blob/4.0/wp-includes/…
Dec
13
answered How to add add more properties to WP_Post object in search results loop
Dec
4
awarded  Necromancer
Nov
15
awarded  Popular Question
Oct
11
awarded  Yearling
Oct
2
comment Where should i put my php script for ajax implementation in wordpress?
WP handles all ajax requests through admin-ajax.php. The fact that it considers the script to be running in the 'admin' bears no relation to the origin of the request, or even if the user is logged in.
Sep
30
awarded  Explainer
Sep
22
answered Heartbeat API long polling
Sep
22
comment Heartbeat API long polling
Long polling isn't used due to unreliability of servers (see discussion in #23216). To clarify, is this a question on how to use the Heartbeat API or implement long-polling?
Sep
17
comment How to modify only part of a function through the filter
Sorry, my mistake. Corrected now. (You need to modify $result and return it).