View generate-webp-images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# --------------------------------------------------------------------------- | |
# Generate WebP Images - Uses cwebp command line tool for Linux | |
# This will generate / re-generate all webp images for all JPG and PNG files | |
# Being command line based it is incredibly fast | |
# If you don't want to re-generate existing files set generateall=0 | |
# If you want to re-generate everything set generateall=1 | |
# USE this script at your own risk and Only if you know what you are doing | |
# Written by Mitchell Krog - mitchellkrog@gmail.com |
View fail2ban-reset-log-db.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bash Script by https://gist.github.com/mitchellkrogza | |
# ************************************************************ | |
# This script clears the log file and database of Fail2Ban | |
# This resets Fail2Ban to a completely clean state | |
# Useful to use after you have finished testing all your jails | |
# and completed your initial setup of Fail2Ban and are now | |
# putting the server into LIVE mode | |
# ************************************************************ |
View woocommerce-wcfm-marketplace-notify-user-product-deletion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ====================================================================================== | |
// Notify user of product deletion | |
// Applies to any Woocommerce product but was written specifically for WCFM Marketplace | |
// Copyright Bjorn Patje & Mitchell Krog (thank you Bjorn) | |
// ====================================================================================== | |
// This sends an email to the owner (user) of a product when it is deleted / trashed | |
// The email uses simple html formatting and php variables | |
// Modify the contents of the $body varaible and $subject variable to your liking | |
// ====================================================================================== | |
add_action( 'delete_post', 'notification_for_product', 99 ); |
View flatsome-theme-change-product-titles-to-h2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Flatsome Theme | |
* Change Shop & Catalog Product Titles from <p> to <h2> | |
* Adjust to <h3> <h4> <h5> <h6> as you require. | |
*/ | |
if ( ! function_exists( 'woocommerce_template_loop_product_title' ) ) { | |
function woocommerce_template_loop_product_title() { | |
echo '<h2 class="name product-title ' . esc_attr( apply_filters( 'woocommerce_product_loop_title_classes', 'woocommerce-loop-product__title' ) ) . '">'; | |
woocommerce_template_loop_product_link_open(); |
View woocommerce-change-backorder-message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CHANGE WOOCOMMERCE BACKORDER TEXT | |
// Here I have used a 3 line message with inline styles to change the color and add line breaks | |
// Adapt this as you see fit | |
// Use Code Snippets Plugin to add this function or add yourself to functions.php of your child theme | |
// https://wordpress.org/plugins/code-snippets/ | |
function mywoo_backorder_message( $text, $product ){ | |
if ( $product->managing_stock() && $product->is_on_backorder( 1 ) ) { | |
$text = __( '<strong><p style="color:green">New Stock is on its way !!!!<br>Backorder now - first come first served<br>Please allow 1 – 3 weeks for delivery of this item</p></strong><br>', 'your-textdomain' ); | |
} |
View flatsome-accordion-icon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*ACCORDIAN*/ | |
/* Change the Flatsome default accordion Arrow Icon to a + symbol*/ | |
.accordion-title.active{background-color:#006587!important;color:white!important} | |
.accordion-inner{background-color:#eeeeee!important} | |
.accordion-title{font-size:100%} | |
.accordion-inner{padding:10px;font-size:.85em} | |
.accordion .toggle{top:3px!important;transform-origin: 50% 50%!important;} | |
.accordion .active .toggle{top:3px!important;} | |
.accordion-item {margin-bottom: 8px;} | |
.accordion .icon-angle-down:before{content:"+";} |
View woo-notify-cancellation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wc_cancelled_order_add_customer_email( $recipient, $order ){ | |
return $recipient . ',' . $order->billing_email; | |
} | |
add_filter( 'woocommerce_email_recipient_cancelled_order', 'wc_cancelled_order_add_customer_email', 10, 2 ); |
NewerOlder