Per Søderlind

I code for fun

CloudFlare API and WordPress

CloudFlare protects and accelerates any website online. Once your website is a part of the CloudFlare community, its web traffic is routed through our intelligent global network. We automatically optimize the delivery of your web pages so your visitors get the fastest page load times and best performance. We also...

MemCachier backend for the WP Object Cache

I have a test site at AppFog running WordPress. Being the geek I am, I had to test MemCachier (you'll find it in AppFog Add-Ons) MemCachier manages and scales clusters of memcache servers so you can focus on your app. Memcache is commonly used to speed up page load time and increase...

WordPress and Pow

Here is my second take on running WordPress and WordPress Multisite locally on my Mac (first is here). I just discovered Pow; "Pow is a zero-config Rack server for Mac OS X. Have it serving your apps locally in under a minute", and my first thought was "can I run WordPress on Pow?"....

WordPress plugins and permalinks, how to use pretty links in your plugin

I'm working on a plugin, Read Offline, and one of the wishes was for url friendly links. After intensive googling, here's how I did it: "My Permalink Demo" plugin: <br /> &lt;?php<br /> /*<br /> Plugin Name: My Permalink Demo<br /> Plugin URI: http://soderlind.no/archives/2012/11/01/wordpress-plugins-and-permalinks-how-to-use-pretty-links-in-your-plugin/<br /> Description: Demo plugin to show...

Read Offline

[gallery link="file" columns="4" ids="4239,4537,4538,4539"] 19.1.2015: v 0.2.0 is avaliable at GitHub, please read the changelog prior to installing this version.  Issues Please report issues at https://github.com/soderlind/read-offline/issues To-do Widget Shortcode Footnotes apply_filters Reduce plugin size (aka remove fonts) PDF Font management Features Add download links to the top and bottom of a...

Arrays, Arrays, Arrays; aka Piklist for WordPress

Piklist, still in beta, is a must-have that will save you hours of development time. It's also a WordPress framework (maybe THE WordPress framework). Here's an example I've created. This is still very beta, the table.php I've written is based upon the Custom List Table Example plugin, and I haven't...

oAuth, using WordPress native methods

I like to use the WordPress native methods when I can, here's my take on oAuth. The examples below retrieves the access token Facebook <br /> &lt;?php<br /> define('FACEBOOK_APPID','123'); // replace 123 with your app id<br /> define('FACEBOOK_APPSECRET','abc'); // replace abc with your app secret<br /> define('REDIRECTURI','http://your.redirect.url');</p> <p>if ($_GET['code'] !=...

An alternative Hide ACF Menu from Clients

Here's an alternative to Hide ACF Menu from Clients, add it to your functions.php: <br /> add_action( 'admin_menu', function() {<br /> if (! current_user_can('administrator')) {<br /> remove_menu_page('edit.php?post_type=acf');<br /> }<br /> });<br /> Note, remove_menu_page() needs WordPress 3.1 or newer

Date and Time Picker field for Advanced Custom Fields

  This is an add-on for the Advanced Custom Fields (ACF) WordPress plugin, that allows you to add a Date and Time Picker field type. Works with ACF v3 and v4. ACF PRO 5.0+ is no longer supported, ACF PRO has its own date and time picker. Brought To You By...