Skip to content

Instantly share code, notes, and snippets.

View tamsininnit's full-sized avatar
💜
Focusing

Sarah Tamsin tamsininnit

💜
Focusing
View GitHub Profile
@tamsininnit
tamsininnit / gravity-forms-wordpress-blocked-words.php
Last active September 7, 2023 17:09
Blocks words in Gravity Forms (WordPress Plugin) based on the disallowed words in Settings > Discussion (where you'd usually block words for use in comments)
/* Remember to set your list of blocked words in WordPress > Settings > Discussion > Disallowed Comment Keys */
/* Gravity Forms Blocked Words */
add_filter( 'gform_validation', 'validate_disallowed_keys' );
function validate_disallowed_keys( $validation_result ) {
$form = $validation_result['form'];
$blacklist_keys = get_option( 'blacklist_keys' );
// Add ChatGPT Menu
const onOpen = () => {
const ui = SpreadsheetApp.getUi();
ui.createMenu("ChatGPT")
.addItem("💾 Save Responses as Text", "saveAsText")
.addItem("ChatGPT API Sheet by Sarah Tamsin 💜", "openUrl")
.addToUi();
};