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
// "flexible_content" below, is the name of the Flexible Content field | |
add_filter('acf/load_value/name=flexible_content', 'add_fields', 10, 3); | |
function add_fields($value, $post_id, $field) { | |
if ($value !== NULL) { // $value will only be empty for New Posts | |
return $value; | |
} | |
// lead layouts | |
$value = array( | |
array( |
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
// Inject an SVG icon (heart) into recurring selection box via JS | |
function override_givewp_js() { | |
if( ! is_admin() ) { ?> | |
<script type="text/javascript"> | |
jQuery(document).ready( function($) { | |
$('.give-btn.advance-btn').on('click', function(){ | |
if( $('.give-recurring-donors-choice').length ){ | |
$('.give-recurring-donors-choice').append('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 255.96 256" data-inject-url="http://vertex2022.local/wp-content/themes/vertex-ranch-2022/assets/img/icons/solid/love.svg" class="svg-inject icon-svg icon-svg-sm solid-mono text-red me-4 mb-5 mb-md-0"><path class="fill-primary" d="M96 186.67A90.77 90.77 0 01186.63 96a89.82 89.82 0 0138.9 8.9 64.28 64.28 0 00-95.3-86L120 29.15l-10.28-10.27a64.21 64.21 0 00-90.93 0 64.56 64.56 0 000 91.06L96 187.28z"></path><path class="fill-secondary" d="M186.63 117.33A69.34 69.34 0 10256 186.67a69.41 69.41 0 00-69.37-69.34zm30.19 55.73l-30.54 37.32a8.06 8.06 0 01-5.92 3h-.27a8 8 0 01-5.84-2.53l-17.46-18.67a8 8 0 0111.7-10.95l11.2 |
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 | |
/** | |
* Reusable loaders | |
*/ | |
$specialLoadHnds = (object) array( | |
'scripts' => (object) array( | |
'async' => array(), | |
'defer' => array() | |
), | |
'styles' => (object) array( |
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
/** | |
* Deregister and dequeue all GiveWP scripts and styles, unless we're loading them for a GiveWP forms iframe. | |
**/ | |
function give_deregister_script() { | |
$deregister = false; | |
/** | |
* example gleaned from https://www.boilingpotmedia.com/education/wordpress-conditional-tag-if-url-contains-a-string/ | |
* though that example uses split() [deprecated] |
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 | |
//My ACF Fields for reference | |
//testimonials - field group | |
//testimonial - sub-field | |
//testimonial_header - sub-field | |
//First Repeater Row in Array | |
$rows = get_field( 'testimonials', 348 );// grab all rows from page 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
<?php | |
/** | |
* Gravity Wiz // Gravity Forms // Submit to Access | |
* | |
* Require that a form be submitted before a post or page can be accessed. | |
* | |
* @version 1.7 | |
* @author David Smith <[email protected]> | |
* @license GPL-2.0+ | |
* @link https://gravitywiz.com/submit-gravity-form-access-content/ |
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 | |
/** | |
* Gravity Wiz // Gravity Forms // Redirect if Email Exists | |
* | |
* Redirect to a specified URL if the the submitted email address matches an existing user. | |
* | |
* Note: Does not work with AJAX-enabled forms. | |
* | |
* @version 0.1 | |
* @author David Smith <[email protected]> |
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 | |
/** | |
* Gravity Wiz // Gravity Forms // User Registration // Skip Registration if Email Exists | |
* | |
* If submitted email is already registered, skip registration. | |
* | |
* @version 0.4 | |
* @author David Smith <[email protected]> | |
* @license GPL-2.0+ | |
* @link http://gravitywiz.com/ |
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
/* | |
* Scroll the page to the URL Hash, IF URL contains one | |
* Author: Jesse Matlock - @revivemarketing | |
*/ | |
if (window.location.hash) { | |
var element = window.location.hash; | |
if ($(element).length) { | |
$('html, body').animate({ | |
scrollTop: $(element).offset().top // IF header is fixed, add height of header in px. eg. '- 140' |
NewerOlder