Skip to content

Instantly share code, notes, and snippets.

View colegeissinger's full-sized avatar

Cole Geissinger colegeissinger

View GitHub Profile
@colegeissinger
colegeissinger / modify-breadcrumbs-in-canvas-from-woothemes.php
Created January 5, 2016 06:38
Modify Breadcrumbs in Canvas EG 03
<?php
function my_custom_woo_breadcrumbs($args) {
$defaults = array(
'separator' => '&raquo;',
'before' =>; '
);
return $defaults;
}
?>
@colegeissinger
colegeissinger / modify-breadcrumbs-in-canvas-from-woothemes.php
Last active January 5, 2016 06:37
Modify Breadcrumps in Canvas EG 02
<?php
function my_custom_woo_breadcrumbs() {
}
add_filter('woo_breadcrumbs_args', 'my_custom_woo_breadcrumbs');
?>
@colegeissinger
colegeissinger / modify-breadcrumbs-in-canvas-from-woothemes.php
Last active January 5, 2016 06:34
Modify Breadcrumbs in Canvas EG 01
<?php
function my_custom_woo_breadcrumbs() {
}
?>
@colegeissinger
colegeissinger / custom-message-in-wp-admin-area-eg01.php
Last active January 5, 2016 06:22
Custom Message in WP-Admin EG 01
<?php
function geissinger_reading_warning_message() {
global $pagenow;
if ( $pagenow == 'options-reading.php' )
echo '<div class="error"><h3>WARNING! Do not adjust the "Front Page Displays" options! Your theme depends on these settings!.</h3></div>';
}
add_action( 'admin_notices', 'geissinger_reading_warning_message' );
@colegeissinger
colegeissinger / adding-custom-post-types-to-omnisearch-in-jetpack-eg-01.php
Created January 5, 2016 06:07
Adding Custom Post Types to Omnisearch in Jetpack
<?php
// Add our $post_type_name to Omnisearch!
if ( class_exists( 'Jetpack_Omnisearch_Posts' ) ) {
class CG_Post_Type_Omnisearch extends Jetpack_Omnisearch_Posts {
var $post_type = 'post-type-id-here';
}
new CG_Post_Type_Omnisearch;
}
?>
@colegeissinger
colegeissinger / build-hollow-box-css3-eg-03.css
Created January 5, 2016 04:40
Build Hollow Box CSS3 EG 03
&:after {
content:'';
position:absolute;
top:50px;
left:50px;
width:100px;
height:100px;
background-color:#fff;
z-index:2;
}
@colegeissinger
colegeissinger / build-hollow-box-css3-eg01.html
Last active January 5, 2016 04:40
Build Hollow Box CSS3 EG 01
<div class="box center-center"></div>
@colegeissinger
colegeissinger / build-hollow-box-css3-eg02.css
Last active January 5, 2016 04:37
Build Hollow Box CS3 EG 02
.box {
width:200px;
height:200px;
background-color:#DC403B
}
@colegeissinger
colegeissinger / php-interfaces-eg02.php
Last active January 5, 2016 03:51
PHP Interfaces eg 02
/**
* Class CarA
*/
class CarA implements Automobile {
protected $specs;
/**
* Constructor
*
* @param object $specs The object of data defining Car A
@colegeissinger
colegeissinger / php-interfaces-eg-01.php
Created January 5, 2016 03:41
PHP Interfaces ex01
/**
* Automobile interface
*
* Creates a contract that any class implementing this interface must abide by
*/
interface Automobile {
/**
* steering_wheel function
*
* @access public