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
// Just paste this into the console when viewing gtm tags | |
// Find the table element | |
var table = document.querySelector('table.gtm-multiselect-table'); | |
if (!table) { | |
console.error('Table not found on this page.'); | |
} else { | |
// Extract data from the table | |
var data = []; |
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 | |
add_filter( 'gform_zapier_field_value', 'change_field_value_consent', 10, 4 ); | |
function change_field_value_consent( $value, $form_id, $field_id, $entry ) { | |
// apply to form ID 74 and consent field 2 in that form | |
if ( $form_id == '74' && $field_id == '2' ) { | |
// the checkbox is part .1 of the field | |
if ( rgar ( $entry, '2.1' ) == 1 ) { | |
$value['2.1'] = 'true'; | |
} | |
else { |
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
// Disable AJAX page navigation w/wp pagenavi | |
<script>jQuery(function($) {$('div.wp-pagenavi a').on('click', function(e) {e.stopImmediatePropagation();});});</script> |
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
# Apache Server Configs v2.15.0 | MIT License | |
# https://github.com/h5bp/server-configs-apache | |
# (!) Using `.htaccess` files slows down Apache, therefore, if you have | |
# access to the main server configuration file (which is usually called | |
# `httpd.conf`), you should add this logic there. | |
# | |
# https://httpd.apache.org/docs/current/howto/htaccess.html | |
# ###################################################################### |
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
# Force HTTPS | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com [NC] | |
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] | |
# Sub-Domain Only To A Specific URL | |
RewriteCond %{HTTP_HOST} ^sub\.old-domain\.com [NC] | |
RewriteCond %{REQUEST_URI} ^/$ | |
RewriteRule ^(.*)$ http://www.domain.com/url/ [R=301,L] |
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
# first this | |
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' | |
# then this | |
killall Dock |
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
# step 1 - make sure the rich text links are in column (a) | |
# step 2 - export sheet as a webpage (.html) | |
# step 3 - open sheet in chrome, open dev tools and paste this in the console: | |
let cells = document.getElementsByTagName('td'); | |
for (let i = 0; i < cells.length; i++) { | |
let links = cells[i].getElementsByTagName('a'); | |
for (let k = 0; k < links.length; k++) { | |
if (typeof links[k] !== 'undefined') { |
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 | |
/** | |
* Random Tracking Code | |
*/ | |
/** | |
* Adds Tracking script to footer of thank-you page | |
*/ | |
function coa_add_trackingCode($order_id) { |
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
/** | |
* Adds form title to a data attribute on the form element | |
* @param [string] $form_tag The string containing the <form> tag | |
* @param [object] $form The current form | |
* @return [string] The new <form> tag string | |
*/ | |
function gravity_form_tag($form_tag, $form) { | |
$form_title = $form['title']; | |
$form_tag = str_replace('<form', "<form data-formtitle='{$form_title}'", $form_tag); | |
return $form_tag; |
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
# Compares Columns A and B by outputting values that are found in column A but NOT B. | |
Useful for checking a full site crawl against a sitemap. | |
=FILTER(A2:A,ISNA(MATCH(A2:A,B2:B,0))) |
NewerOlder