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
# Delete all users with a role of "subscriber" from a WordPress database. | |
# | |
# Assumes the `wp_` table prefix | |
DELETE FROM wp_users WHERE ID IN ( SELECT user_id FROM wp_usermeta WHERE meta_key = 'wp_capabilities' AND meta_value LIKE '%subscriber%' ); | |
DELETE FROM wp_usermeta WHERE user_id IN ( SELECT user_id FROM wp_usermeta WHERE meta_key = 'wp_capabilities' AND meta_value LIKE '%subscriber%' ); |
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
# USAGE: watch_sync [destination_folder] | |
# Watch and sync a folder | |
watch_sync() { | |
# The first and only argument is the folder to sync to. | |
TO=$(echo "$1" | sed 's/\/$//') | |
# We assume the current folder is the one to sync from. | |
FROM=$(pwd) |
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 dependencies | |
*/ | |
import { unregisterBlockVariation, registerBlockVariation } from '@wordpress/blocks' | |
import { addFilter } from '@wordpress/hooks'; | |
import { registerPlugin } from '@wordpress/plugins'; | |
import { select, subscribe } from '@wordpress/data'; | |
/** | |
* Internal dependencies |
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
{ | |
"plugins": [ "." ], | |
"themes": [ "WordPress/twentytwentyfive" ] | |
} |
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
#!/bin/bash | |
# iterate-by-date.sh - A template script for looping through days/months/years and running a command that takes | |
# before and after arguments. | |
# | |
# Usage: ./iterate-by-date.sh [iterate_by] [start_date] [end_date] | |
# | |
# Options: | |
# - iterate_by: The granularity of the operation - day, month or year (default: day). | |
# - start_date: The start date for the operation in YYYY-MM-DD format (default: 30 days ago). |
OlderNewer