Skip to content

Instantly share code, notes, and snippets.

Avatar
🎧
Working from home

David Chandra Purnama turtlepod

🎧
Working from home
View GitHub Profile
@turtlepod
turtlepod / functions.php
Last active Aug 24, 2017 — forked from spencerfinnell/functions.php
Add a button to the main single hero actions in Listify. Add 'button-secondary' class to change the color to the accent color.
View functions.php
<?php
/**
* Plugin Name: Listify - Custom Single Listing Hero Button
*/
function custom_listify_single_job_listing_actions_after() {
global $post;
// Get URL.
$url = get_post_meta( $post->ID, 'your_custom_meta_key', true );
View github-webhook-handler.php
<?php
/**
* GitHub webhook handler template.
*
* @see https://developer.github.com/webhooks/
* @author Miloslav Hůla (https://github.com/milo)
*/
$hookSecret = 's.e.c.r.e.t'; # set NULL to disable check
@turtlepod
turtlepod / functions.php
Created Aug 20, 2016 — forked from tripflex/functions.php
Automatically set/assign parent taxonomy terms for hierarchical taxonomies in WordPress
View functions.php
<?php
add_action( 'set_object_terms', 'auto_set_parent_terms', 9999, 6 );
/**
* Automatically set/assign parent taxonomy terms to posts
*
* This function will automatically set parent taxonomy terms whenever terms are set on a post,
* with the option to configure specific post types, and/or taxonomies.
*
@turtlepod
turtlepod / unplugged-plugin.php
Created Nov 29, 2012 — forked from rachelbaker/unplugged-plugin.php
Load a different WordPress theme for mobile visitors
View unplugged-plugin.php
<?php
/*
Plugin Name: Unplugged Mobile Theme
Plugin URI: http://www.rachelbaker.me
Description: A plugin and theme for WordPress that automatically reformats your blog's content for optimized viewing on Apple's <a href="http://www.apple.com/unplugged/">unplugged</a> and <a href="http://www.apple.com/ipodtouch/">iPod touch</a>.
Author: Rachel Baker
Version: 0.1
Author URI: http://www.rachelbaker.me
# Special thanks to Imthiaz Rafiq and the wp-pda Plugin (http://imthi.com/wp-pda/) which this plugin is derived from.