Skip to content

Instantly share code, notes, and snippets.

View aguilar1181's full-sized avatar

Raul aguilar1181

View GitHub Profile
@aguilar1181
aguilar1181 / all_fields_extra_options.php
Created June 21, 2019 18:09 — forked from bhwebworks/all_fields_extra_options.php
The Gravity Forms {all_fields} merge tag in notifications includes all fields which had data entered, it doesn't include HTML fields, Section Break descriptions, nor does it allow you to omit fields from the notification. By adding the following code to your themes functions.php file you will gain the ability to include HTML fields, and Section …
/**
* to exclude field from notification add 'exclude[ID]' option to {all_fields} tag
* 'include[ID]' option includes HTML field / Section Break field description / Signature image in notification
* see http://www.gravityhelp.com/documentation/page/Merge_Tags for a list of standard options
* example: {all_fields:exclude[2,3]}
* example: {all_fields:include[6]}
* example: {all_fields:include[6],exclude[2,3]}
*/
add_filter( 'gform_merge_tag_filter', 'all_fields_extra_options', 11, 5 );
function all_fields_extra_options( $value, $merge_tag, $options, $field, $raw_value ) {
@aguilar1181
aguilar1181 / Yoast-SEO-database-cleanup.sql
Last active November 8, 2023 16:10 — forked from jdevalk/DB-cleanup.sql
Cleanup Yoast SEO plugin leftovers after uninstalling it.
--
-- BACKUP YOUR DATABASE FIRST AND ALWAYS.
-- Replace 'wp_' with your prefix if you changed it.
--
--
-- This removes all rows from the wp_postmeta table.
--
DELETE FROM wp_postmeta WHERE meta_key = '_yoast_wpseo_meta-robots' AND meta_value = 'index,follow';
DELETE FROM wp_postmeta WHERE meta_key = '_yoast_wpseo_meta-robots-noindex' AND meta_value = '0';