This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Wordpress Management | |
# Remove all subscribers using SQL Query | |
# Delete all of the users with Subscribe capabilities | |
DELETE FROM wp_users WHERE ID IN ( SELECT user_id FROM wp_usermeta WHERE meta_key = 'wp_capabilities' AND meta_value LIKE '%subscriber%' ); | |
# Cleanup the meta (bonus! it cleans up all meta not associated with an existing account) | |
DELETE FROM wp_usermeta WHERE user_id NOT IN ( SELECT id FROM wp_users ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require("node-fetch"); | |
let slackToken = process.env.slack_token | |
function main(args) { | |
if (!args.name || !args.email || !args.message || !args.site) { | |
return {"body": "Error - missing arguments"} | |
} | |
let name = args.name | |
let email = args.email | |
let message = args.message |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState } from "react"; | |
function Form() { | |
const [name, setName] = useState(""); | |
const [message, setMessage] = useState(""); | |
const [email, setEmail] = useState(""); | |
const [submitClicked, setSubmitClicked] = useState(); | |
const [formError, setFormError] = useState([]); | |
const submit = () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Catch the incoming params | |
const incomingQueryString = window.location.search.substring(1); // drops ? from the front; | |
// Capture all of the link clicks | |
document.addEventListener(`click`, (e) => { | |
// if it's an <a> link | |
if (e.target.closest(`a`) && incomingQueryString.length > 0) { | |
e.preventDefault(); | |
// if it already has params, combine them, if not, add the new ones | |
window.location.href = |