Per Søderlind

I code for fun

WordPress, how to modify the HTML of an oEmbed link

Introduction Background: EPiServer is the CMS for the Norwegian Government main site, www.regjeringen.no and we use WordPress for more ad hoc sites. Task: Based on the design guide for regjeringen.no, add 23 video to WordPress. 23 video supports oembed, so adding it is easy <?php // replace NAME with your...

CSS Flags library for WordPress

The CSS Flags plugin / library for WordPress loads a dynamicly created CSS. It has the following responsive Scalable Vector Graphics (SVG) flags: [cssflag countries="all"] Usage The total CSS file size is 4 MB, and you don't want to send all that data back to the users, so you must use...

WordPress theme development, add and activate required plugins

At work we're developing a new WordPress theme. The theme "depends" on a few plugins. We are adding the plugins using the TGM Plugin Activation library. Our implementation is using most of the example.php code, but I decided to store the plugin data in a json file: [ { "name": "Advanced...

Continuous Deployment from GitHub to WordPress Azure

  TL;DR: Create a .deployment file and push it to GitHub: [config] DEPLOYMENT_TARGET=D:\home\site\wwwroot\wp-content\themes\my-theme At work we are developing a new theme for our WordPress sites. We use git and GitHub, and to test changes we do continuous deployment to a free WordPress site at Azure. Setting up contious deployment from GitHub to...

Metro Share Social Fonts

Metro Share Social Fonts is a lightweight add-on plugin to the Metro Share plugin. It will replace the default Metro Share social icons with icomoon social fonts   Lightweight CSS 2849 Bytes Fonts 9405 Bytes (icomoon.min.eot 1927B, icomoon.min.svg 2606B, icomoon.min.ttf 1880B and icomoon.woff 2992B) Prerequisite The Metro Share plugin. Download The...

AceCustomFieldType

An Ace Custom Field Type for the Admin Page Framework.   Adding AceCustomFieldType class My_Settings extends AdminPageFramework { public function start_My_Settings() { if (! class_exists('AceCustomFieldType')) include_once(dirname( __FILE__ ) . '/AceCustomFieldType/AceCustomFieldType.php'); $sClassName = get_class( $this ); new AceCustomFieldType( $sClassName ); } public function setUp() { /* add section etc */ $this->addSettingFields(...

TablePress Extension: Chartist

[gallery link="file" ids="4467,4468,4469,4470,4471,4472,4484,4494,4495"]   Using Chartist.js, this TablePress extension creates a responsive chart based on the data in a TablePress table. Usage Add the Shortcode [table-chart id=123 /] to a post or page to create a chart from the TablePress table 123. Optional parameters Show/hide chart line: showline=true (default: true)...

MEXP 23, a 23 Video extention for WordPress Media Explorer

This plugin is an extension for WordPress Media Explorer plugin that adds the 23 Video service. The extension allows user to search vidoes from 23 Video by text and tag. Development of this plugin is done on GitHub. Pull requests welcome. The plugin is also available from the WordPress plugin directory. Requirements and...

WP Live Preview Links

[gallery link="file" ids="4347,4523"] WP Live Preview Links allows you to see a live scaled preview of the site you are linking to in a pop-up dialog style window prior to clicking on it. WP Live Preview Links does not use an external service to create these "thumbnails". In the admin...