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
{# Function to extract YouTube video ID #} | |
{% macro extract_youtube_id(url) %} | |
{% set cleaned_url = url|trim %} | |
{% set video_id = cleaned_url | |
| replace("https://www.youtube.com/watch?v=", "") | |
| replace("http://www.youtube.com/watch?v=", "") | |
| replace("https://youtu.be/", "") | |
| replace("http://youtu.be/", "") | |
| split("&") | |
| first |
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
{# add macro for video schema.org #} | |
{% import '../../macros/video-schemaorg.html' as video_macros %} | |
{{ video_macros.video_schema(module.options_video) }} |
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
{% require_css %} | |
<style> | |
{% scope_css %} | |
{% end_scope_css %} | |
</style> | |
{% end_require_css %} |
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
// repolace | |
{{ $json["jobs"]["location"]["workplace_type"].replace('on_site', 'onsite') }} |
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
$('.hs_cos_wrapper_type_form').on('hsvalidatedsubmit', '.hs-form', function (e) { | |
console.log( 'check check' ); | |
}); | |
window.addEventListener('message', function (event) { | |
if (event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormSubmit') { | |
/* print to the console on submit, or add in custom redirect in here */ | |
console.log('onFormSubmit'); | |
} | |
}); |
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
add_filter( 'register_post_type_args', function( $args, $post_type ) | |
{ | |
if( ('industries' === $post_type || 'success-stories' === $post_type || 'integrations-product' === $post_type ) && is_array( $args ) ) { | |
$args['rewrite']['with_front'] = false; | |
} | |
return $args; | |
}, 99, 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 | |
/** | |
* based on https://gist.github.com/mgibbs189/63ce2faf110b9021ca68e16a50955fc4 | |
& based on https://gist.facetwp.com/gist/gist-63ce2faf110b9021ca68e16a50955fc4 | |
* Works with FacetWP | |
* Group things by taxonomy with taxonomy name before posts | |
* dont remove class names facet-wrap and facetwp-template | |
*/ | |
<div class="facet-wrap"> |
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
SELECT Id, Phone, | |
CASE( | |
/* Check if phone number contains a country code */ | |
IF( | |
REGEX(Phone, '^[+](.*)$'), | |
/* If phone number already contains country code, format it */ | |
REGEX( | |
SUBSTITUTE(Phone, ' ', ''), | |
'[\\+]', '00' | |
), |
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
// core version | |
import { gsap } from "gsap"; | |
// Accordion for Task | |
// Helper function to get elements by class name and return the first match | |
function getElementByClassName(className) { | |
return document.querySelector('.' + className); | |
} |
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
// core version | |
import { gsap } from "gsap"; | |
import { Flip } from "gsap/flip"; | |
gsap.registerPlugin(Flip); | |
// Accordion for Task | |
const groups = gsap.utils.toArray(".accordion-group"); | |
groups.forEach(el => { | |
el.addEventListener("click", () => toggleMenu(el)); |
NewerOlder