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 / 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' );
@deckerweb
deckerweb / bbpress-search-widget.php
Created April 15, 2012 20:03
bbPress Search Widget plugin v1.1+ -- filters and constants for customizing and branding
<?php
/** bbPress Search Widget: Remove Search Label */
define( 'BBPSW_SEARCH_LABEL_DISPLAY', false );
add_filter( 'bbpsw_filter_label_string', 'custom_bbpsw_label_string' );
/**
* bbPress Search Widget: Custom Search Label
*/
@deckerweb
deckerweb / gwnf-helper-functions.php
Last active October 3, 2015 14:58
Genesis Widgetized Not Found & 404 plugin v1.0.0 or higher -- helper functions, plus filters for customizing and branding
<?php
/** Do NOT include the opening php tag */
// since plugin version v1.1.0:
/** Genesis Widgetized NotFound: 404 Error Page - Full-Width Layout */
add_action( 'genesis_meta', '__gwnf_layout_404_full_width' );
/** Genesis Widgetized NotFound: Search not found Page - Full-Width Layout */
@deckerweb
deckerweb / gist:2481017
Created April 24, 2012 16:03
Genesis Framework: Change Sidebar Names
<?php
add_action( 'widgets_init', 'ddw_change_sidebar_names', 20 );
/**
* Genesis Framework: Change Sidebar Names
*
* @author David Decker - DECKERWEB
* @link http://genesisthemes.de/en/
* @link http://twitter.com/deckerweb
*/
@deckerweb
deckerweb / gwfoot-helper-functions.php
Created April 26, 2012 08:12
Genesis Widgetized Footer plugin v1.0+ -- helper functions, plus filters for customizing and branding
<?php
// since plugin version v1.0:
/** Genesis Widgetized Footer: Reposition Disclaimer Widget to the Very Bottom */
add_action( 'genesis_before', '__gwfoot_footer_disclaimer_bottom' );
add_filter( 'gwfoot_filter_footer_one_widget_title', 'gwfoot_custom_footer_one_widget_title' );
/**
* Genesis Widgetized Footer: Custom 1st Footer Area Widget Title
@deckerweb
deckerweb / gist:2503953
Created April 26, 2012 22:58
WPML Plugin: Conditional Switching Languages - helper code
<?php
/**
* WPML: Conditional Switching Languages
*
* @author David Decker - DECKERWEB
* @link http://twitter.com/deckerweb
*
* @global mixed $sitepress
*/