Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Schönrock flymke

View GitHub Profile
@flymke
flymke / input.scss
Created Apr 12, 2021
Generated by SassMeister.com.
View input.scss
$primary: '#555';
$grey: '#eee';
$grid-breakpoints: (
xs: 0,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
);
@flymke
flymke / custom.js
Created Mar 16, 2021
Elementor PRO smartmenus.js - show submenu on click instead of hover
View custom.js
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();
});
});
View 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 Nov 6, 2020
SantaPress: How to disable bootstrap-modal in Avada
View functions_avada-disable-bs-modal-1.php
/* 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');
}
View santapress_custom.css
/* 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 Sep 11, 2020
WooCommerce Germanized Pro 2.6.1 - clone packing slip page on PDF
View functions.php
/*
* 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 Sep 11, 2020
WooCommerce Germanized Pro 2.1.6 - send packing slip via email
View functions.php
/*
* 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 Sep 7, 2020
klarna-checkout-external-payment-methods-for-woocommerce.php
View gist:c5f49b52c8ecf5069c68b6d9a4e84c76
<?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
Include jQueryModal for SantaPress
View gist:eafbdf972fc5ef6c173ece70ec1731ec
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 Jan 9, 2020 — forked from frosit/infectedFiles.md
Some commands for finding and clearing infected PHP files
View infectedFiles.md

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'