Skip to content

Instantly share code, notes, and snippets.

<?php
if ( ! defined( 'ABSPATH' ) ){
exit;
}
class Nexcess_Add_To_Team_Trigger extends AutomateWoo\Trigger{
/**
* Define which data items are set by this trigger, this determines which rules and actions will be available
@gitwalt
gitwalt / nexcess-trigger-base.php
Created January 13, 2024 13:15 — forked from curtismchale/nexcess-trigger-base.php
[Nexcess - AutomateWoo Triggers] see blog post: https://www.nexcess.net/blog/adding-custom-triggers-to-automatewoo/ #woocommerce #automatewoo
<?php
/*
Plugin Name: Nexcess - AutomateWoo Triggers
Plugin URI: https://nexcess.net
Description: Adds custom triggers to AutomateWoo
Version: 1.0
Author: SFNdesign, Curtis McHale
Author URI: http://sfndesign.ca
License: GPLv2 or later
*/
@gitwalt
gitwalt / rewrite.txt
Created December 14, 2023 18:56
Rewrite Rules
# DISALLOW DOUBLE SLASHES IN URLS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /(([^/\ ]+/)*)/+([^\ ]*)
RewriteRule ^ /%1%3 [L,R=301]
</IfModule>
@gitwalt
gitwalt / dequeue-generatefonts.php
Created June 8, 2023 19:43
GP disable google fonts
add_action( 'wp_enqueue_scripts', function() {
wp_dequeue_style( 'generate-fonts' );
} );
add_action( 'admin_init', function() {
add_filter( 'generate_google_fonts_array', '__return_empty_array' );
} );
@gitwalt
gitwalt / htaccess.txt
Created March 22, 2022 17:37
Get Images from Live Site
# Get Images from Live Site
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^wp-content/uploads/(.*) https://livedomain.tld/wp-content/uploads/$1 [R=302,L]
</IfModule>
@gitwalt
gitwalt / htaccess-20220304
Created March 4, 2022 11:52
htaccess (Performance 2022)
# --------------------------------------------------------------
# PERFORMANCE
# Date: 04.03.2022
# --------------------------------------------------------------
# --------------------------------------------------------------
# COMPRESS (DEFLATE)
# --------------------------------------------------------------
<IfModule mod_deflate.c>
@gitwalt
gitwalt / cpt-permalinks.php
Created June 17, 2021 07:18 — forked from chrisguitarguy/cpt-permalinks.php
How to add fields to the WordPress permalinks page
@gitwalt
gitwalt / WordPress.xml
Created April 20, 2021 16:55 — forked from Rarst/WordPress.xml
WordPress Live Templates for PhpStorm
<?xml version="1.0" encoding="UTF-8"?>
<templateSet group="WordPress">
<template name="aa" value="add_action( '$hook$', '$callback$' );&#10;$END$" description="add_action" toReformat="false" toShortenFQNames="true">
<variable name="hook" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="callback" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="false" />
<option name="HTML" value="false" />
<option name="XSL_TEXT" value="false" />
<option name="XML" value="false" />
@gitwalt
gitwalt / ip-sperren.txt
Created March 24, 2020 10:20
IPs sperren (.htaccess)
# IPs sperren
order allow,deny
deny from xxx.xxx.xxx.xxx
deny from xxx.xxx.xxx.xxx
Allow from All
@gitwalt
gitwalt / index.html
Created October 30, 2019 11:41
JavaScript for WordPress 1.2.9 - Arrays // source https://jsbin.com/qaqofu
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="1.2.9 - Arrays">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JavaScript for WordPress</title>
</head>
<body>