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
#!/bin/bash | |
# Script to remove specified taxonomy terms from posts of a certain type tagged with a specific term | |
# Define variables | |
POST_TYPE="custom_post_type" # Example: "floors" | |
PRIMARY_TAXONOMY="primary_taxonomy" # Example: "fltypes" | |
SPECIFIC_TERM="specific_term" # Example: "discontinued" | |
SECONDARY_TAXONOMY="secondary_taxonomy" # Example: "fltones" |
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
export function mutateCache(q, cb) { | |
let query = q.hasOwnProperty('variables') | |
? {query: q.query, variables: q.variables} | |
: {query: q} | |
let data = cache.readQuery(query) | |
cb(data) | |
cache.writeQuery({ | |
...query, |