This file contains 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
for plugin in $(wp --allow-root plugin list --update=available --status=inactive --field=name); | |
do | |
TITLE=$(wp --allow-root plugin get $plugin --field=title) | |
# look into how we can mark the date here. Maybe also only output final result | |
rm -r wp-content/plugins/$plugin/* && rmdir wp-content/plugins/$plugin | |
git add -A wp-content/plugins/$plugin | |
git commit -m "$(printf "delete plugin: $TITLE")" | |
echo "$TITLE -> $VERSION" >> ./reports/deleted-plugins.txt | |
done; |
This file contains 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
// set this to the ID of the group | |
var group = document.querySelector('#wppizza_addingredients-custom-group-96'), | |
// setting this as a variable in case it changes in the future | |
ingredientClass = 'wppizza_addingredients_ingrcg_sortable'; | |
// find the ingredients that are enabled for this group | |
group.querySelectorAll('input[type="checkbox"]:checked').forEach(function(ingredient) { | |
// find the label for the ingredient | |
var label = ingredient.parentElement.innerText; |
This file contains 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
// get a node list of all the ingredients on the page | |
var ingredients = document.querySelectorAll('.wppizza_ingr_option.wppizza_option'); | |
// and then loop through each one, setting the meal size | |
ingredients.forEach(function(ingredient){ | |
ingredient.querySelector('input[type="checkbox"]').checked=true; | |
}) |
This file contains 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
// set this to the ID of the meal size | |
var mealSize = ""; | |
// get a node list of all the ingredients on the page | |
var ingredients = document.querySelectorAll('.wppizza_ingr_option.wppizza_option'); | |
// and then loop through each one, setting the meal size | |
ingredients.forEach(function(ingredient){ | |
let dropdown = ingredient.querySelector('select.ingredients'); | |
dropdown.value = mealSize; |
This file contains 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
INVOICE_ID="" | |
CUSTOMER_ID="" | |
FOOTER="" | |
DESCRIPTION="" | |
stripe invoices create --customer=${CUSTOMER_ID} --days-until-due=1 --footer=\"${FOOTER}\" --collection-method=\"send_invoice\" -d \"metadata[invoice]\"=${ID} --description="${DESCRIPTION}" |
This file contains 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
<?php | |
/** | |
* some config variables | |
*/ | |
/** | |
* User Agent value | |
* | |
* app name or email address | |
* |
This file contains 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
// get all rows that we're interested in (each represent 1 paycheck) | |
let rows = document.getElementById('check-listings-table').querySelectorAll('tbody tr[role="row"]'); | |
// instantiate the array we'll use for all contributions | |
var contributions = []; | |
// loop over each row | |
for (var i = 0; i < rows.length; i++) { | |
// we never actually use this... | |
let row = rows[i]; |
This file contains 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
# prints a report of the WP version | |
i=1 | |
touch version.txt | |
COUNT=$(wc -l sites.txt) | |
for SITE in $(cat sites.txt) | |
do | |
cd $SITE | |
echo "Working on $SITE ($i of $COUNT)..." | |
echo "## $SITE" >> ../version.txt | |
url=$(wp option get siteurl) |
This file contains 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
i=1 | |
touch admin-email.txt | |
COUNT=$(wc -l sites.txt) | |
for SITE in $(cat sites.txt) | |
do | |
cd $SITE | |
echo "Working on $SITE ($i of $COUNT)..." | |
echo "## $SITE" >> ../admin-email.txt | |
url=$(wp option get siteurl) | |
postURL="/wp-admin/options-general.php" |
This file contains 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
i=1 | |
touch urls.txt | |
COUNT=$(wc -l sites.txt) | |
for SITE in $(cat sites.txt) | |
do | |
cd $SITE | |
echo "Working on $SITE ($i of $COUNT)..." | |
echo "## $SITE" >> ../urls.txt | |
url=$(wp option get siteurl) | |
postURL="/wp-login.php" |
NewerOlder