location ~* ^(/.+)\.(jpg|jpeg|jpe|png|gif)$ {
add_header Vary Accept;
if ($http_accept ~* "webp"){
set $imwebp A;
}
if (-f $request_filename.webp) {
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
| // repolace | |
| {{ $json["jobs"]["location"]["workplace_type"].replace('on_site', 'onsite') }} |
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
| $('.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 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
| 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 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 | |
| /** | |
| * 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 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 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 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
| // 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 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
| // 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)); |
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 | |
| /** | |
| * Delete pages | |
| * @link https://developer.wordpress.org/reference/functions/wp_delete_post/ | |
| */ | |
| function apsolut_delete_multiple_pages_from_plugin() { | |
| // Set an array of page IDs to delete | |
| $page_ids = array(1, 2, 3); // Hello World, Homepage, Privacy Policy |
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
| wsl -u root -e bash -c "apt-get upgrade -y >/dev/null" | |
| wsl bash -c 'sudo usermod -aG docker $USER' | |
| wsl bash -c 'echo CAROOT=$CAROOT' | |
| wsl -u root mkcert -install | |
| wsl -u root service docker start | |
| if (-not(wsl -e docker ps)) { | |
| throw "docker does not seem to be working inside the WSL2 distro yet. " | |
| } | |
| # If docker desktop was previously set up, the .docker can break normal use of docker client. |