This file contains hidden or 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_shortcode('user_email', function($atts) { | |
$the_atts = shortcode_atts([ | |
"encode" => 'false' | |
], $atts); | |
if( is_user_logged_in() ) { | |
$current_user = wp_get_current_user(); | |
if( $the_atts['encode'] == 'true' ) { |
This file contains hidden or 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
/** | |
* Gravity Wiz // GP Nested Forms // Provide {RowID} Merge Tag in Child Form | |
* https://gravitywiz.com/documentation/gravity-forms-nested-forms/ | |
* | |
* Replaces {RowID} merge tag in the child form with the Row ID while that form is displayed within nested forms. | |
* Parent element must have a "rowid-merge" CSS class added. | |
* | |
* Instructions: | |
* | |
* 1. Install this snippet with our free Custom JavaScript plugin. |
This file contains hidden or 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
/** | |
* Gravity Wiz // Gravity Forms Address Autocomplete // Require User to Autofill At Least Once | |
* https://gravitywiz.com/documentation/gravity-forms-address-autocomplete/ | |
* | |
* Hides a required field you add to your form, and fills it with a value only if the user successfully autofills | |
* in the form at least once. | |
* | |
* Instructions: | |
* | |
* 1. Install this snippet with our free Custom JavaScript plugin. |
This file contains hidden or 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
<div id="timekeeping-solution">{Are you interested in a timekeeping solution that would allow employees to easily clock in and out online?:22}</div> | |
<script> | |
// When the page is ready | |
window.addEventListener('load', function () { | |
if (document.querySelector('body') !== null) { // Some element that should be rendered by now before we execute code | |
const timekeepingSolution = document.querySelector('#timekeeping-solution'); | |
if( timekeepingSolution.innerHTML == "No" ) { | |
timekeepingSolution.style.display = "none"; |
This file contains hidden or 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 | |
/** | |
* Gravity Wiz // Gravity Forms // Update User Password After Submission | |
* https://gravitywiz.com/ | |
* | |
* Updates the password for the user ID associated with the inputted email, allowing a custom password reset form. | |
* | |
*/ | |
// Update "123" to your form ID, "4" to your "Password" field ID, and "5" to your "Confirm Password" field ID. |
This file contains hidden or 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
➡️ To go from the General Tab to the Design tab: | |
jQuery('.fusion-tabs #general').css('display','none'); jQuery('.fusion-tabs #design').css('display','block'); | |
➡️ To go from the General Tab to the Animation Tab: | |
jQuery('.fusion-tabs #general').css('display','none'); jQuery('.fusion-tabs #animation').css('display','block'); | |
➡️ To go from the General Tab to the Background Tab: | |
jQuery('.fusion-tabs #general').css('display','none'); jQuery('.fusion-tabs #background').css('display','block'); | |
----------------- |
This file contains hidden or 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
SELECT * | |
FROM [Accounts] | |
WHERE EmailType IN ('HOME', 'EC_EMAIL', 'BUS') AND Active = 1 AND EmailAddress NOT LIKE '%_@__%.__%' |
This file contains hidden or 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
<script> | |
// What to do when the read more buttons are clicked (they're toggles now) | |
(function($) { | |
jQuery(document).ready(function() { | |
let menuLinks = jQuery('a.read-more'), | |
toggles = jQuery('.et_pb_toggle'); | |
menuLinks.each(function(){ | |
jQuery(this).click(function(){ | |
let clickedLinkTarget = jQuery(this).attr('href'); | |
This file contains hidden or 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
// Thanks https://stackoverflow.com/a/260876 | |
//var link = document.querySelector("link[rel~='icon']"); // Can use this one if you expect only one existing favicon; requires a few tweaks below | |
let links = document.querySelectorAll("link[rel*='icon']"); | |
if (!links) { | |
let link = document.createElement('link'); | |
link.rel = 'icon'; | |
document.getElementsByTagName('head')[0].appendChild(link); | |
} | |
This file contains hidden or 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 | |
function load_scripts() { | |
wp_enqueue_script( 'clattering-font', get_stylesheet_directory_uri() . '/Clattering.ttf', array() ); | |
} | |
add_action( 'wp_enqueue_scripts', 'load_scripts' ); |