Skip to content

Instantly share code, notes, and snippets.

View rowatt's full-sized avatar

Mark Rowatt Anderson rowatt

View GitHub Profile
@rowatt
rowatt / breadcrumb.php
Created November 1, 2016 19:02
Extend Genesis_Breadcrumb class to support hierarchical custom post types
<?php
/**
* Class to control breadcrumbs display. Adds hierachical display of custom post type breadcrumbs
* to the Genesis default.
*
* Note - to avoid conflicts this file must be loaded after the main Genesis_Breadcrumbs class has loaded,
* so the loading is triggered in class Site_Hooks.
*/
class Site_Breadcrumb extends Genesis_Breadcrumb {
<?php
require_once( 'classes/class.config.php' );
require_once( 'classes/class.fdms_tools.php' );
$curlSession = curl_init();
$post_data[ 'chargetotal' ] = '10.00';
$post_data[ 'paymentMethod' ] = 'V';
$post_data[ 'creditcard_name' ] = 'Mark Anderson';
$post_data[ 'baddr1' ] = '123 High St';
<?php
/**
* Class Presi_Core_Class
*
* This class doesn't do anything, but provides a framework used by other classes
* It is specific to WordPress
*/
abstract class Presi_Core_Class
@rowatt
rowatt / class-admin-menus.php
Last active January 4, 2016 22:19
Customise WordPress admin menus
<?php
class Admin_Menus extends Presi_Core_Class
/**
* Keep track of which admin menu separator we are adding
* @var int
*/
private $separator_index = 0;
@rowatt
rowatt / singleton.php
Last active January 4, 2016 22:19
Singleton Class Template
<?php
SINGLETON::get_instance();
class SINGLETON extends Presi_Core_Class
{
private static $instance = NULL;
public static function get_instance()
{
NULL === self::$instance and self::$instance = new self;