This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseCSS(str) { | |
function trim(str) { | |
return (str||'').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); | |
} | |
var i, j, k, | |
split = '}', | |
cur_key = '', | |
cur_key_split, | |
css = str.replace(/\t*/g, '').replace(/\s{2}/, ' ').replace(/[\n|\r]/g, ' ').replace(/\/\*.*?\*\//g, '').split(split), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Elementar jQuery plugin [DRAFT] */ | |
// use Elementar fonts via Typotheque's web font system | |
// args: family name, style name, webfont key | |
$('.myClass').eFont('Sans A', '13 21 2', 'WF-XXXXXX-XXXXX') | |
// use self-hosted fonts | |
// args: family name, style name, path to fonts folder | |
$('.myClass').eFont('Sans A', '13 21 2', '../fonts/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// img unautop, Courtesy of Interconnectit http://interconnectit.com/2175/how-to-remove-p-tags-from-images-in-wordpress/ | |
// add img class and alignment to figure by @_RickBenetti | |
function img_unautop($pee) { | |
$class = apply_filters('get_image_tag_class', $class, $id, $align, $size); | |
$pee = preg_replace('/<p>\\s*?(<a .*?><img.*?><\\/a>|<img.*?>)?\\s*<\\/p>/s', '<figure class="'. $class+$align .'">$1</figure>', $pee); | |
return $pee; | |
} | |
add_filter( 'the_content', 'img_unautop', 30 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Set en_US lang code if not in admin. | |
*/ | |
function md_set_en_us_locale( $locale ) { | |
if ( ! is_admin() ) { | |
if ( ! defined( 'MD_REAL_LANG' ) ) | |
define( 'MD_REAL_LANG', $locale ); | |
$locale = 'en_US'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Attachment Categories | |
Description: Allows attachments to be categorised | |
Version: 1.0 | |
Author: Human Made Limited | |
Author URI: http://hmn.md | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: (WCM) Backbone/Underscore template loader | |
* Description: Loads Underscore (or other) templates using the WP Dependency API | |
*/ | |
/** | |
* @author Franz Josef Kaiser http://unserkaiser.com/ | |
* @link http://chat.stackexchange.com/transcript/message/19439060#19439060 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WordPress Scoped Cache Helper | |
* | |
* This addresses the problem of obsolete cached data for an object after it is updated. | |
* | |
* Sometimes we need to cache specific bits of data related to a certain object, and keep the cached data in sync | |
* with the object's state. This helper makes it easier to tap into object update process to clear ( and optionally | |
* rebuild ) the cache. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"regex": ["http://*youtube.com/watch*", "http://*.youtube.com/v/*", "https://*youtube.com/watch*", "https://*.youtube.com/v/*", "http://youtu.be/*", "http://*.youtube.com/user/*", "http://*.youtube.com/*#*/*", "http://m.youtube.com/watch*", "http://m.youtube.com/index*", "http://*.youtube.com/profile*", "http://*.youtube.com/view_play_list*", "http://*.youtube.com/playlist*"], "about": "YouTube is the world's most popular online video community, allowing millions of people to discover, watch and share originally-created videos. YouTube provides a forum for people to connect, inform, and inspire others across the globe and acts as a distribution platform for original content creators and advertisers large and small.", "displayname": "YouTube", "name": "youtube", "domain": "youtube.com", "subdomains": ["m.youtube.com"], "favicon": "http://c2548752.cdn.cloudfiles.rackspacecloud.com/youtube.ico", "type": "video"}, {"regex": ["http://*twitch.tv/*", "http://*justin.tv/*/b/*", "http://*justin.tv/*/w/*"], "about": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################## | |
## Kirby configuration | |
############################## | |
location /kirby/ { | |
include /etc/nginx/mime.types; | |
index index.php; | |
root /var/www/addons88/; | |
if (!-e $request_filename){ |
OlderNewer