Skip to content

Instantly share code, notes, and snippets.

View danielbrinneman's full-sized avatar

Daniel Brinneman danielbrinneman

View GitHub Profile
@danielbrinneman
danielbrinneman / Custom Post Type and Taxonomies
Last active September 26, 2016 23:30
Created November 27, 2012
Custom Post Type
function create_post_type_reservations() {
register_post_type( 'reservations', array(
'labels' => array(
'name' => __( 'Reservations' ),
'singular_name' => __( 'Reservation' ),
/* Place DIV around both images to target the two inside */
<div class=“tbp-images”>
<p><a…<img… </a></p>
<p><a…<img… </a></p>
</div>
@danielbrinneman
danielbrinneman / sortable-table.html
Last active May 4, 2017 05:24
I created this to replicate the staff list on a website but only use one page and add one more column for the department that would have a non-sortable table followed by a sortable table.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Directory Table</title>
<script src="https://code.jquery.com/jquery.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.13.3/jquery.tablesorter.min.js"></script>
@danielbrinneman
danielbrinneman / index.html
Last active October 30, 2017 22:26
PayPal Form and jQuery
/*
** Please credit me when using this jQuery code -
** jQuery code from scratch by Daniel Brinneman - Copyright Aug 11-15, 2012 - www.lionsdendesigns.com
*/
<!DOCTYPE html />
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset="UTF-8" />
@danielbrinneman
danielbrinneman / bookmark-this-page.html
Created January 24, 2018 02:03
Bookmark this page
<a href="javascript:if(document.all)window.external.AddFavorite(location.href,document.title); else if(window.sidebar)window.sidebar.addPanel (document.title,location.href,'');">Bookmark this page</a>
@danielbrinneman
danielbrinneman / gist:e0e90a3fd18eb42d9e35581210a9490d
Last active September 25, 2018 05:28
Jekyll Codeship Rakefile GitHub Pages
system rake generate
system rake publish
require 'tmpdir'
desc "Generate jekyll site"
task :generate do
puts "## Install bundles"
system "bundle install"
puts "## Generating Site with Jekyll"
system "bundle exec jekyll build --incremental"
puts "## Jekyll Webmention"
@danielbrinneman
danielbrinneman / plugin.php
Created August 27, 2020 03:27 — forked from kovshenin/plugin.php
Settings API Demo
<?php
/**
* Plugin Name: My Plugin
* Plugin Description: Settings API Demo
*/
add_action( 'admin_menu', 'my_admin_menu' );
function my_admin_menu() {
add_options_page( 'My Plugin', 'My Plugin', 'manage_options', 'my-plugin', 'my_options_page' );
}