Defer some scripts – Hcaptcha, Callrail

function defer_some_scripts($tag, $handle, $src) { $is_hcaptcha_script = str_starts_with( $handle, ‘hcaptcha’ ); $is_callrail_swap_script = str_starts_with( $handle, ‘swapjs’); $should_defer = $is_hcaptcha_script || $is_callrail_swap_script; if ( $should_defer ) { $tag = str_replace(‘>‘, ‘ defer>‘, $tag); } return $tag; } add_filter(‘script_loader_tag’, ‘defer_some_scripts’, 10, 3);Continue reading

NEXTSTEP SHORTCODE

/** * Compliance Calendar – Cron Jobs (Overdue Detection) * Checks for overdue compliance items and sends notifications via GHL webhook * * @package BHA_Portal * @subpackage Compliance_Calendar * @version 6.1 * * WPCODE SETTINGS: * – Location: Run Everywhere…Continue reading

[DEBUG] SiteGround Purge Scheduling

add_filter(‘pre_schedule_event’, function ($pre, $event /*, $wp_error */) { if (is_object($event) && isset($event->hook) && $event->hook === ‘siteground_optimizer_purge_cron_cache’) { $bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 18); $lines = []; foreach ($bt as $f) { $fn = (isset($f[‘class’]) ? $f[‘class’] . ($f[‘type’] ?? ”) : ”)…Continue reading