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_filter('wp_speculative_loading_enabled', '__return_false'); | |
remove_action('wp_head', 'wp_output_speculationrules_script'); | |
add_action('template_redirect', function () { | |
ob_start(function ($html) { | |
return preg_replace('/<script type="speculationrules".*?<\/script>/is', '', $html); | |
}); | |
}); |
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_filter( 'bricksextras/breadcrumbs/', function( $crumbs ) { | |
/* only change if on singular service post */ | |
if ( is_singular('service') ) { | |
$url = '/services'; | |
$label = 'Services'; | |
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_action('wp_enqueue_scripts', function() { | |
// Only allow on /support page for logged-in users | |
if (!is_user_logged_in() || !is_page('support')) { | |
wp_dequeue_script('fluent-support/customer-portal'); | |
} | |
}, 999); |
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
// Fix for PIP button issue with multiple players | |
function fixPIPMediaSessionIssue() { | |
// Keep track of which player is currently in PIP mode | |
let pipPlayer = null; | |
// Store original mediaSession handlers | |
const originalHandlers = {}; | |
// Function to capture and store the original mediaSession handlers | |
function captureOriginalHandlers() { |
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 x_auto_populate_menu() { | |
$menu_id = 123; // Replace with your actual menu ID | |
if (!$menu_id) { | |
return; // Exit if no menu ID is set | |
} |
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
<!-- Original SVG --> | |
<svg class="" xmlns="http://www.w3.org/2000/svg" width="29" height="34" aria-hidden="true" fill="none"><path fill="var(--primary)" d="M21.503 3.78c4.485 4.048 5.476 10.72 2.427 15.951-.366.629-1.623 1.997-1.54 2.594l6.485 9.384c-.361 1.216-2.782 3.356-3.802 1.665l-6.128-8.359c-.795-.337-1.578.276-2.368.465C9.05 27.285 1.645 23.071.427 15.208-1.395 3.454 12.661-4.199 21.502 3.78Zm2.11 9.475c0-5.876-4.755-10.64-10.622-10.64-5.866 0-10.62 4.764-10.62 10.64 0 5.877 4.755 10.64 10.622 10.64 5.866 0 10.622-4.763 10.622-10.64h-.002Z"></path></svg> | |
<!-- Will increase size with CSS --> | |
<svg class="" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" aria-hidden="true" fill="none"><path fill="var(--primary)" d="M21.503 3.78c4.485 4.048 5.476 10.72 2.427 15.951-.366.629-1.623 1.997-1.54 2.594l6.485 9.384c-.361 1.216-2.782 3.356-3.802 1.665l-6.128-8.359c-.795-.337-1.578.276-2.368.465C9.05 27.285 1.645 23.071.427 15.208-1.395 3.454 12.661-4.199 21.502 3.78Zm2.11 9.475c0-5.876-4.755-10.64-10.622- |
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
/* current code, fails when fails when t.body is undefined */ | |
request: function (e, t) { | |
const { body: n } = t; // This fails when t.body is undefined | |
r = JSON.parse(n); | |
return "bricks_render_element" === r?.action && r?.element && (m(r.element), E(r.element.id)), [e, t]; | |
} | |
// Possible solution, returns original request if no body |
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_action( 'wp_enqueue_scripts', 'ensure_wc_cart_fragments', 20 ); | |
function ensure_wc_cart_fragments() { | |
wp_enqueue_script( 'wc-cart-fragments' ); | |
} | |
add_action('wp_enqueue_scripts', 'custom_enqueue_cart_refresh_script'); | |
function custom_enqueue_cart_refresh_script() { |
NewerOlder