Skip to content

Instantly share code, notes, and snippets.

View DavidSteinbauer's full-sized avatar

David Steinbauer DavidSteinbauer

View GitHub Profile
@DavidSteinbauer
DavidSteinbauer / remove_emails.php
Created May 26, 2014 09:06
Remove Woocommerce Emails in WC 2.x
add_action('woocommerce_email', 'do_not_send_some_email_notifications');
function do_not_send_some_email_notifications(WC_Emails $wc_emails) {
remove_action('woocommerce_order_status_completed_notification', array($wc_emails->emails['WC_Email_Customer_Completed_Order'], 'trigger'));
}
@DavidSteinbauer
DavidSteinbauer / gist:b3be208db3668a69b6ab
Created November 22, 2014 07:30
Apple's Time Machine to a Network-Storage via Terminal
sudo tmutil setdestination afp://user:pass@host/share
// **********************************************************************//
// Clean Topbar
// **********************************************************************//
add_action('wp_before_admin_bar_render', 'annointed_admin_bar_remove', 0);
function annointed_admin_bar_remove() {
global $wp_admin_bar;
/* Remove their stuff */
$wp_admin_bar->remove_menu('wp-logo');
$wp_admin_bar->remove_menu('customize');
@DavidSteinbauer
DavidSteinbauer / SSL-Umstellung - .htaccess
Created August 19, 2016 11:27
zur Vermeidung von duplicate content
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
@DavidSteinbauer
DavidSteinbauer / Beschreibungsfeld
Created November 14, 2017 12:08
Shop Product Kategorie Templates
<h1>Produktkategorie</h1>
<h2>Alles für die Produktkategorie</h2>
Lorem ipsum <strong>dolor sit amet</strong>, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ▶ <a title="" href="#details">Mehr zum Thema BE-FuelSaver erfahren Sie hier</a>.
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
[
{
"name": "0 - Backlog",
"color": "CCCCCC"
},
{
"name": "1 - Ready",
"color": "CCCCCC"
},
{
/*
* Adding Parameters to Permalinks
*
*/
add_filter( 'post_type_link', 'lc_append_query_string', 10, 2 );
function lc_append_query_string( $url )
{
if(is_admin()) return $url;
$query = array();