Skip to content

Instantly share code, notes, and snippets.

View kellenmace's full-sized avatar

Kellen Mace kellenmace

View GitHub Profile
.single-property {
// CSS rules go here
}
@kellenmace
kellenmace / remove-custom-post-type-slug-from-permalinks-2.php
Created May 14, 2014 18:36
Remove Custom Post Type Slug from Permalinks 2
/**
* Have WordPress match postname to any of our public post types (page, post, race)
* All of our public post types can have /post-name/ as the slug, so they better be unique across all posts
* By default, core only accounts for posts and pages where the slug is /post-name/
*/
function gp_parse_request_trick( $query ) {
// Only noop the main query
if ( ! $query->is_main_query() )
return;
@kellenmace
kellenmace / oop-settings-page.php
Created June 9, 2014 15:27
OOP Settings Page
/**
* Admin page markup
* @since 0.1.0
*/
public function admin_page_display() {
self::admin_page_setup();
?>
<div class="wrap cmb_options_page <?php echo self::$key; ?>">
@kellenmace
kellenmace / oop-settings-page-full.php
Created June 9, 2014 15:37
OOP Settigns Page Full
<?php
/**
* Facebook Conversion Pixel Options
* @version 1.0
*/
class Fb_Pxl_Admin {
/**
* Option key, and option page slug
* @var string
<?php
/**
* Facebook Conversion Pixel Options
* @version 1.0
*/
class Fb_Pxl_Admin {
/**
* Option key, and option page slug
* @var string
<?php
/**
* Facebook Conversion Pixel Options
* @version 1.0
*/
class Fb_Pxl_Admin {
/**
* Option key, and option page slug
* @var string
public static $key = 'fb_pxl_options';
<?php
/**
* Facebook Conversion Pixel Options
* @version 1.0
*/
class Fb_Pxl_Admin {
/**
* Option key, and option page slug
* @var string
<?php
/*
Plugin Name: Facebook Conversion Pixel
Plugin URI: n/a
Description: Add Facebook Conversion Pixels to Posts, Pages, or any other custom post types.
Version: 1.0
Author: Kellen Mace
Author URI: http://kellenmace.com/
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@kellenmace
kellenmace / class.subscriptions.php
Last active August 29, 2015 14:12
brian is c00l
<?php
/**
* Enable Subscriptions Options for supporting product types and payment gateways
* @package exchange-addon-recurring-payments
* @since 1.0.0
*/
if( class_exists( 'IT_Exchange_Recurring_Payments' ) ) {
class IT_Exchange_Subscriptions extends IT_Exchange_Recurring_Payments {