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:3498510
Created August 28, 2012 14:30
Multisite Toolbar Additions -- constants for customizing
<?php
// since plugin version v1.0:
// Constants:
/** Multisite Toolbar Additions: Disable Custom Nav Menu for Super Admins */
define( 'MSTBA_SUPER_ADMIN_NAV_MENU', FALSE );
/** Multisite Toolbar Additions: Disable Plugin Support for Network Wide Plugins */
@deckerweb
deckerweb / wc-custom-add-to-cart-texts.php
Created June 3, 2014 14:22
Custom text for 'woocommerce_product_add_to_cart_text' filter for all product types/ cases.
<?php
/** Do NOT include the opening php tag */
add_filter( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' );
/**
* Custom text for 'woocommerce_product_add_to_cart_text' filter for all product types/ cases.
*
* @link https://gist.github.com/deckerweb/cf466e017fd01d503469
@deckerweb
deckerweb / elementor-form-additional-webhook.php
Created February 12, 2019 12:40 — forked from csalzano/elementor-form-additional-webhook.php
Elementor Form additional webhook example
<?php
/**
* Plugin Name: Elementor Form Additional Webhook
* Plugin URI: https://coreysalzano.com/
* Description: Adds a second Webhook to the Lot Wizard trial signup form
* Version: 1.0.0
* Author: Corey Salzano
* Author URI: https://github.com/mistercorey
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
@deckerweb
deckerweb / gist:1e17c328b5f36adfecb5
Created November 3, 2015 11:31 — forked from vanbernaert/gist:4dd1557abda08e7be90a
Gravity Forms: restrict days on datepicker
jQuery(function () {
// 0 = monday, 1 = tuesday, 2 = wednesday, 3 = thursday,
// 4=friday, 5 = saturday, 6=sunday
var daysToDisable = [2, 4, 5];
jQuery("#input_id_id").datepicker({
beforeShowDay: disableSpecificWeekDays
});
@deckerweb
deckerweb / astra-remove-category-sidebar.php
Last active March 10, 2023 11:22
Conditionally remove sidebar from category archives for Astra Theme
<?php
/** Do NOT include the opening php tag */
add_filter( 'astra_page_layout', 'ddw_astra_conditionally_remove_category_sidebar' );
/**
* Conditionally remove sidebar in Astra
*
* @see https://codex.wordpress.org/Conditional_Tags
* @link https://gist.github.com/deckerweb/18a141ee5a7a32f056c1f720cd0a1d28
<?php
/**
* Snippet for deleting the customer IP address from WooCommerce orders.
* Important for Trusted Shops® certificates in Germany.
*/
add_action( 'woocommerce_checkout_update_order_meta', 'mp1401091554', 1 );
function mp1401091554( $order_id ) {
update_post_meta(
$order_id,
'_customer_ip_address',
@deckerweb
deckerweb / widget-titles.php
Created January 31, 2013 10:57
WordPress Widget Titles: Change default H4 to an H3.
<?php
add_filter( 'widget_title', 'ddw_custom_widget_title_headline' );
/**
* Widget Titles: Change default H4 to an H3.
*
* @author David Decker - DECKERWEB
* @link http://deckerweb.de/twitter
*/
function ddw_custom_widget_title_headline( $title ) {
@deckerweb
deckerweb / education20-home-widgetized.php
Last active March 2, 2022 05:22
Genesis: Education 2.0 Child Theme -- Add widget support for the Education 2.0 homepage. If no widgets active, display the default loop.
<?php
/** Add support for widgetized home page */
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'ddw_education_home_loop_helper' );
/**
* Add widget support for the Education 2.0 homepage.
* If no widgets active, display the default loop.
*
* @author David Decker - DECKERWEB
@deckerweb
deckerweb / gist:2392882
Created April 15, 2012 13:46
Easy Digital Downloads Toolbar plugin v1.0+ -- filters and constants for customizing and branding
<?php
// Action hooks:
add_action( 'eddtb_custom_main_items', 'eddtb_add_custom_main_items' );
/**
* Easy Digital Downloads Toolbar: Add Custom Main Items
*/
function eddtb_add_custom_main_items() {
// Your custom stuff here, you might only use the WP Toolbar / Admin Bar API here!
@deckerweb
deckerweb / astra-disable-google-fonts.php
Last active January 4, 2022 04:19
Astra Theme - disable Google Fonts
<?php
/** Do NOT include the opening php tag */
/**
* Do not load a list of Google Fonts in Astra
*
* @link https://gist.github.com/deckerweb/528e9f64f09b15ed4d6729b77d87dc78
* @author David Decker - DECKERWEB
*/