Skip to content

Instantly share code, notes, and snippets.

View deckerweb's full-sized avatar
🏠
Working from home

David Decker deckerweb

🏠
Working from home
View GitHub Profile
@deckerweb
deckerweb / genesis-layout-extras.php
Created November 9, 2011 19:38
Genesis Layout Extras Plugin 1.3-alpha -- For Genesis 1.8 and new Admin Classes
<?php
/**
* Main plugin file. This plugin for Genesis Theme Framework allows modifying of default layouts for
* homepage, singular, archive, attachment, search, 404 and even bbPress 2.x pages via Genesis theme settings.
*
* @package GenesisLayoutExtras
* @author David Decker
* @origin Based on the work of @WPChildThemes for original plugin called "Genesis Layout Manager" (C) 2010
*
* Plugin Name: Genesis Layout Extras
@deckerweb
deckerweb / gist:1574571
Created January 7, 2012 11:59
Plugin: WP Single Post Navigation -- Customize parameters for "previous post link" -- add this to functions.php of your theme or child theme
<?php
add_filter( 'wpspn_previous_post_link', 'custom_wpspn_previous_link' );
/**
* WP Single Post Navigation: Add custom filters for "previous post link"
*/
function custom_wpspn_previous_link() {
$args = array (
'format' => '%link', // Change link format
@deckerweb
deckerweb / gist:1574576
Created January 7, 2012 12:01
Plugin: WP Single Post Navigation -- Customize parameters for "next post link" -- add this to functions.php of your theme or child theme
<?php
add_filter( 'wpspn_next_post_link', 'custom_wpspn_next_link' );
/**
* WP Single Post Navigation: Add custom filters for "next post link"
*/
function custom_wpspn_next_link() {
$args = array (
'format' => '%link', // Change link format
@deckerweb
deckerweb / gist:1576197
Created January 7, 2012 22:02
Plugin: Genesis Single Post Navigation -- Customize parameters for "previous post link" -- add this to functions.php of your child theme
<?php
add_filter( 'gspn_previous_post_link', 'custom_gspn_previous_link' );
/**
* Genesis Single Post Navigation: Add custom filters for "previous post link"
*/
function custom_gspn_previous_link() {
$args = array (
'format' => '%link', // Change link format (default: %link)
@deckerweb
deckerweb / gist:1576203
Created January 7, 2012 22:03
Plugin: Genesis Single Post Navigation -- Customize parameters for "next post link" -- add this to functions.php of your child theme
<?php
add_filter( 'gspn_next_post_link', 'custom_gspn_next_link' );
/**
* Genesis Single Post Navigation: Add custom filters for "next post link"
*/
function custom_gspn_next_link() {
$args = array (
'format' => '%link', // Change link format (default: %link)
@deckerweb
deckerweb / gist:1579012
Created January 8, 2012 17:05
WP Single Post Navigation - functions.php code for changing link direction - copy all and place in your functions.php of theme or child theme - you can place the full code at the beginning AFTER the opening "<?php" line - it will do no harm!
<?php
/**
* WP Single Post Navigation: Reverse link direction
*/
define( 'WPSPN_REVERSE_LINK_DIRECTION', 'reverse_direction' );
/**
* For other snippets see this Gist:
@deckerweb
deckerweb / gist:2049993
Created March 16, 2012 13:02
BuddyPress Toolbar plugin - only display for admins / super admins -- add to functions.php file of theme/child theme:
<?php
add_action( 'wp_before_admin_bar_render', 'ddw_bptb_admin_only' );
/**
* BuddyPress Toolbar for Admins only
*
* NOTE: Should work fine for plugin versions 1.0 and 1.1
*
* @author David Decker - DECKERWEB
* @link http://genesisthemes.de/en/
@deckerweb
deckerweb / wcaba-tweaks.php
Last active October 2, 2015 04:37
WooCommerce Admin Bar Addition plugin version 2.2.0 or higher -- filters and constants for customizing and branding
<?php
/** Do NOT include the opening php tag */
// Hooks:
add_action( 'wcaba_custom_group_items', 'wcaba_custom_additional_group_item' );
/**
* BuddyPress Toolbar: Custom Resource Group Items
*
@deckerweb
deckerweb / gist:2181318
Created March 24, 2012 11:28
Thesis Toolbar plugin v1.1+ -- filters and constants for customizing and branding
<?php
/** Capability filters & helper functions */
add_filter( 'tstb_filter_capability_all', '__tstb_admin_only' );
add_filter( 'tstb_filter_capability_all', '__tstb_role_editor' );
add_filter( 'tstb_filter_capability_all', '__tstb_cap_switch_themes' );
add_filter( 'tstb_filter_capability_all', '__tstb_cap_manage_options' );
add_filter( 'tstb_filter_capability_all', '__tstb_cap_install_plugins' );
add_filter( 'tstb_filter_capability_all', 'custom_tstb_capability_all' );
@deckerweb
deckerweb / gist:2198788
Created March 25, 2012 18:16
Genesis Toolbar Extras plugin v1.0+ -- filters and constants for customizing and branding
<?php
// since plugin version v1.0:
/** Capability filters & helper functions */
add_filter( 'gtbe_filter_capability_all', '__gtbe_admin_only' );
add_filter( 'gtbe_filter_capability_all', '__gtbe_role_editor' );
add_filter( 'gtbe_filter_capability_all', '__gtbe_cap_edit_theme_options' );
add_filter( 'gtbe_filter_capability_all', '__gtbe_cap_manage_options' );
add_filter( 'gtbe_filter_capability_all', '__gtbe_cap_install_plugins' );