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
@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" />
@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' );
@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)',
#!/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
@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;
}
}
}
@thorstel
thorstel / layout.ini
Last active March 3, 2022 07:24
Total Commander Configuration
[Layout]
DriveBar1=1
DriveBar2=0
DriveBarFlat=1
InterfaceFlat=1
DriveCombo=0
DirectoryTabs=1
XPthemeBg=0
CurDir=1
TabHeader=1
@w33zy
w33zy / jpg-png-optimize.md
Created January 4, 2018 20:39 — forked from VirtuBox/jpg-png-optimize.md
Optimize your jpg & png images with jpegoptim and optipng on linux

JPG and PNG image bulk optimization

Install jpegoptim and optipng

apt update && apt install jpegoptim optipng -y

JPG optimization

cd /path/to/your/image/folder
@butlerblog
butlerblog / functions.php
Last active March 28, 2024 02:09
SMTP using wp-config.php for settings #smtp #wp_mail
<?php // Don't use this line.
/*
* Add the script below to wherever you store custom code snippets
* in your site, whether that's your child theme's functions.php,
* a custom plugin file, or through a code snippet plugin.
*/
/**
* This function will connect wp_mail to your authenticated
@pinalj
pinalj / custom-email-manager.php
Last active October 29, 2021 13:52
This file contains the code to include email classes and trigger custom emails.
<?php
/**
* Handles email sending
*/
class Custom_Email_Manager {
/**
* Constructor sets up actions
*/
public function __construct() {
@tmblog
tmblog / page-contact-form.php
Created March 31, 2017 20:42
Simple WordPress Contact Form without Plugin - Bootstrap ready.
<?php /* Template Name: Contact Page */
$response = "";
//function to generate response
function my_contact_form_generate_response($type, $message){
global $response;
if($type == "success") $response = "<div class='alert alert-success'>{$message}</div>";
else $response = "<div class='alert alert-danger'>{$message}</div>";