Skip to content

Instantly share code, notes, and snippets.

View flymke's full-sized avatar

Michael Schönrock flymke

View GitHub Profile
@flymke
flymke / input.scss
Created April 12, 2021 23:03
Generated by SassMeister.com.
$primary: '#555';
$grey: '#eee';
$grid-breakpoints: (
xs: 0,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
);
@flymke
flymke / custom.js
Created March 16, 2021 11:44
Elementor PRO smartmenus.js - show submenu on click instead of hover
jQuery(function($) {
$('.elementor-nav-menu').on('beforeshow.smapi', function(e, menu) { return false; });
$('.menu-item-has-children > a').attr('href', 'javascript:void(0);');
$('.menu-item-has-children > a').click(function() {
$(this).parent().find('.sub-menu').toggle();
});
});
@flymke
flymke / single-door.php
Created November 9, 2020 14:21
single-door.php
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package WP_Bootstrap_Starter
*/
get_header(); ?>
@flymke
flymke / functions_avada-disable-bs-modal-1.php
Created November 6, 2020 20:46
SantaPress: How to disable bootstrap-modal in Avada
/* disable bootstrap-modal in Avada globally */
add_action( 'wp_enqueue_scripts', 'custom_disable_theme_js' );
function custom_disable_theme_js() {
Fusion_Dynamic_JS::deregister_script('bootstrap-modal');
}
@flymke
flymke / santapress_custom.css
Last active November 28, 2020 12:26
SantaPress - Custom CSS - https://santapress.halloecho.de
/* disable Santa hat */
.santapress-post.modal:before { display:none; }
/* disable snow */
.santapress-post.modal:after { display:none; }
/* make 4 doors in a row */
@media only screen and (min-width: 768px) {
.santapress-container .santapress-door {
width: 25% !important;
@flymke
flymke / functions.php
Created September 11, 2020 20:06
WooCommerce Germanized Pro 2.6.1 - clone packing slip page on PDF
/*
* WooCommerce Germanized Pro 2.1.6
* Function to clone packing slip on PDF
**/
function my_clone_packing_slip( $attachment, $document ) {
if ( $document->type === 'packing_slip' ) {
WC_germanized_pro()->set_upload_dir_filter();
$path = get_attached_file( $attachment );
@flymke
flymke / functions.php
Last active September 11, 2020 20:07
WooCommerce Germanized Pro 2.1.6 - send packing slip via email
/*
* WooCommerce Germanized Pro 2.1.6
* Function to send packing slip via email
**/
function woocommerce_order_status_processing_callback($order_id) {
if ( ! $order_id ) {
return;
}
@flymke
flymke / gist:c5f49b52c8ecf5069c68b6d9a4e84c76
Created September 7, 2020 11:29
klarna-checkout-external-payment-methods-for-woocommerce.php
<?php
/*
Plugin Name: Klarna Checkout (V3) External Payment Methods for WooCommerce
Plugin URI: http://krokedil.com
Description: Adds PayPal and BACS as an extra payment method in Klarna Checkout iframe. Works with V3 of Klarna Checkout.
Version: 2.0.0
Author: Michael Schönrock
Author URI: https://www.halloecho.de
*/
@flymke
flymke / gist:eafbdf972fc5ef6c173ece70ec1731ec
Created May 14, 2020 13:16
Include jQueryModal for SantaPress
function santapress_load_jquerymodal() {
wp_enqueue_script( 'jquery-modal-santapress', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.2/jquery.modal.min.js', array(), '0.9.2', true );
}
add_action('wp_enqueue_scripts', 'santapress_load_jquerymodal');
@flymke
flymke / infectedFiles.md
Created January 9, 2020 09:37 — forked from frosit/infectedFiles.md
Some commands for finding and clearing infected PHP files

Finding infected files with following bash commands

** Command to list all infected files:

  • grep -lr --include=*.php "eval(base64_decode" /path/to/webroot
  • grep -lr --include=*.php "eval" .
  • grep -lr --include=*.php "base64" .

Command to remove malicious code:

  • grep -lr --include=*.php "eval(base64_decode" /path/to/webroot | xargs sed -i.bak 's/<?php eval(base64_decode[^;]*;/<?php\n/g'