Skip to content

Instantly share code, notes, and snippets.

View topmask's full-sized avatar
🤩
Out sick

Allen Smith topmask

🤩
Out sick
View GitHub Profile
@lukecav
lukecav / ngnix.config
Last active May 3, 2023 10:41
Rate limit the wp-login.php using NGNIX
http {
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=10r/s;
server {
location /wp-login.php {
limit_req zone=mylimit burst=20 nodelay;
}
}
}
#!/usr/bin/env bash
# WP-CLI Back up Script to Amazon S3
# Source: https://www.jonathan.vc
# Author: Jonathan Dingman
# Adapted from Mike at WP Bullet
#define local path for backups
BACKUPPATH=/tmp/backups
#path to WordPress installations
@tdmrhn
tdmrhn / product_key_features.php
Created September 5, 2021 15:48
Product Key Features Field
<?php
// Display Input Field on Backend
add_action( 'woocommerce_product_options_general_product_data', function () {
global $woocommerce, $post;
echo '<div class="options_group">';
woocommerce_wp_text_input(
array(
'id' => 'product_key_features',
'label' => __( 'Product Key Features', 'woocommerce' ),
'placeholder' => 'Enter product key features (3 words)',
@tdmrhn
tdmrhn / disable-woocommerce-bloat.php
Last active April 22, 2024 04:33
Disable WooCommerce Bloat
<?php
add_filter( 'woocommerce_admin_disabled', '__return_true' );
add_filter( 'jetpack_just_in_time_msgs', '__return_false', 20 );
add_filter( 'jetpack_show_promotions', '__return_false', 20 );
add_filter( 'woocommerce_allow_marketplace_suggestions', '__return_false', 999 );
add_filter( 'woocommerce_helper_suppress_admin_notices', '__return_true' );
add_filter( 'woocommerce_marketing_menu_items', '__return_empty_array' );
add_filter( 'woocommerce_background_image_regeneration', '__return_false' );
add_filter( 'wp_lazy_loading_enabled', '__return_false' );
add_filter( 'woocommerce_menu_order_count', 'false' );
@neicore
neicore / email-template-sample.html
Created May 30, 2022 07:12
Email Template Sample for the article "Our experience in creating HTML email templates"
<html style=" color-scheme: light dark; supported-color-schemes: light dark;">
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet" />
<link href="https://unpkg.com/ionicons@4.5.5/dist/css/ionicons.min.css" rel="stylesheet" />
<title>Successful Deposit</title>
<meta name="color-scheme" content="light dark" />
<meta name="supported-color-schemes" content="light dark" />