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
/** | |
* Get elapsed time, time ago, supports timezone | |
* @param integer time --- string | unix timestamp | |
* @param strings --- string | array | |
* @return string elapsed time | |
*/ | |
function(datetime, strings, elative_to) { | |
if (arguments.length) { | |
var datetime = typeof datetime !== 'string' ? datetime : new Date(datetime) |
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 | |
/** | |
* WP-API modify post response fields | |
* | |
*/ | |
/** | |
* Posts per page | |
*/ | |
function kli_wp_api_query_post_per_page( $query ){ |
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
<!-- | |
// From Klihelp: | |
// https://gist.github.com/klihelp/67798dfc1266c3684326 | |
// | |
// The idea is that | |
// - we hide the real cursor | |
// - and #custom_cursor div will follow the cursor, inside this div can have any text or image | |
--> | |
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 | |
/** | |
* Use with JSON_API_VERSION <= 1.1.1 | |
* Note: Include the action in your functions.php | |
*/ | |
/** | |
* Remove featured_image field from response | |
* @param object $data |
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: Dynamic Image Resizer | |
Plugin URI: http://ottopress.com | |
Author: Otto42 / Modified by JochenT | |
Author URI: http://ottodestruct.com | |
Version: 1.0.0.1.jt-3 (11.10.2013) | |
Description: Change the WordPress image uploader system to do image resizing on the fly. | |
*/ | |
/* |
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 | |
/** | |
* Prefix Posts Slugs | |
* This hooks into wp_unique_post_slug and adds prefix to post slug. Eg: have post Hello title and slug will be my-prefix-hello. | |
* @author Klipolis | |
* @since 0.1.0 | |
* @version 0.1.0 | |
* @access public | |
* @main WordPress | |
*/ |
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 Plugin Isolation helper | |
* This helps your plugin/theme to have isolated webpages, keeping only your organized prefixed hooks. | |
* @package Hashtagg | |
* @subpackage Base | |
* @author Klipolis | |
* @copyright 2014 Klipolis | |
* @since 0.1.0 | |
* @version 0.1.0 |
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: R Debug | |
Description: Set of dump helpers for debug. | |
Author: Andrey "Rarst" Savchenko | |
Author URI: http://www.rarst.net/ | |
License: MIT | |
*/ | |
/** |
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 | |
/** | |
* Thanks for James Kemp / Iconic turning the idea into a plugin | |
* https://wordpress.org/plugins/shortcode-pagination-for-woocommerce | |
* | |
* This code shows pagination for WooCommerce shortcodes when it's embeded on single pages. | |
* Include into functions.php. | |
*/ | |
if ( ! is_admin() ) { |
NewerOlder