Skip to content

Instantly share code, notes, and snippets.

View joshuadavidnelson's full-sized avatar

Joshua Nelson joshuadavidnelson

View GitHub Profile
<?php
$iso_array = array(
'ABW'=>'Aruba',
'AFG'=>'Afghanistan',
'AGO'=>'Angola',
'AIA'=>'Anguilla',
'ALA'=>'Åland Islands',
'ALB'=>'Albania',
'AND'=>'Andorra',
'ARE'=>'United Arab Emirates',
@joshuadavidnelson
joshuadavidnelson / remove-feeds.php
Last active May 26, 2017 23:33 — forked from chrisguitarguy/remove-feeds.php
Remove all feeds from WordPress
<?php
add_action( 'wp_head', 'remove_feeds_from_wp_head', 1 );
/**
* Remove feed links from wp_head
*/
function remove_feeds_from_wp_head() {
// Remove feed links
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );
@joshuadavidnelson
joshuadavidnelson / jquery-bootstrap-datepicker.css
Created October 5, 2015 05:38 — forked from miwahall/jquery-bootstrap-datepicker.css
jQuery UI Datepicker Bootstrap 3 Style
.ui-datepicker {
background-color: #fff;
border: 1px solid #66AFE9;
border-radius: 4px;
box-shadow: 0 0 8px rgba(102,175,233,.6);
display: none;
margin-top: 4px;
padding: 10px;
width: 240px;
}
@joshuadavidnelson
joshuadavidnelson / wpexternalapi.php
Created March 12, 2016 17:57 — forked from chrisgoddard/wpexternalapi.php
WordPress External API endpoint class
/*
WpExternalApi class use
$api = WpExternalApi::get('url-slug');
will create endpoint at www.example.com/url-slug/json and www.example.com/url-slug/xml
$api->set_logic(callback);
function callback($input){
@joshuadavidnelson
joshuadavidnelson / gist:57210d6218e4039288973d0045a10159
Created May 5, 2017 20:07 — forked from dustyf/gist:b6e72a7a7fd05de9598e
Example WordPress Simple JSON Endpoint Plugin
<?php
/**
* Plugin Name: WDS GIF API
* Plugin URI: http://webdevstudios.com
* Description: Adds a Custom Post Type to store GIFs and an API JSON Endpoint to access GIFs by a tag.
* Author: WebDevStudios
* Author URI: http://webdevstudios.com
* Version: 1.0.0
* License: GPLv2
*/