/** * Mandate: Performance & Speed * Task: Inject fetchpriority=’high’ into Static Block Output * Targets: Image Blocks containing IDs 403, 404, 405 * Rationale: Bypasses Gutenberg static storage to force LCP optimization. */ function possible_force_fetchpriority_block( $block_content, $block ) {…Continue reading
/* === FRS KPI CHARTS (Final Version) === – Feature 1: SQL Join (Uses Completed Date for Timeline, not System Date) – Feature 2: Strip Tags (Reads numbers correctly even with Live Refresh active) */ add_shortcode(‘frs-kpi-charts’, function ($atts) { wp_enqueue_script(‘chartjs’,…Continue reading
/** * MASTER FIX: KPI STATS + LIVE REFRESH + LAYOUT FIXER + GROUP LOGIC * Updates: * 1. Checks Parent/Child/Admin logic for Group IDs. * 2. Uses Direct SQL for Live Refresh (Fixes “0” bug). * 3. Rounds Average…Continue reading
/** * FRS MAINTENANCE LOG – MASTER CONTROLLER (ANTI-LOOP + SQL INJECTION + KPI) * —————————————————————- * 1. Read: Populates Dropdown 34024. * 2. Read: Auto-Fills 10 fields. * 3. Write: Surgical DB Write + Direct KPI Update (No Loops).…Continue reading
add_filter(‘show_admin_bar’, ‘__return_false’);Continue reading
/** * FRS Work Order SLA Stats (by Days to Complete) + SLA Score * Shortcode: [frs_wo_sla_stats] * * Buckets CLOSED work orders by their Days to Complete value * and calculates an SLA score based on 0–7 day completions.…Continue reading
/** * FRS Work Orders per Month (Last 12 Months) * Shortcode: [frs_wo_monthly_counts] * * Shows a bar chart of CLOSED work orders by Completed Date month * with a single blue color family in progressively darker shades. */ add_shortcode(‘frs_wo_monthly_counts’,…Continue reading
/** * Plugin Name: Proceso de Orla (CPT + Estado + Notificaciones) * Description: CPT “Proceso de Orla” con fase por grado (1–6), timeline por rol con iconos, notificaciones por lotes, reenvío, quick edit, seeder, fase 1 por defecto y…Continue reading
add_action( ‘pre_get_posts’, function ( WP_Query $query ) { // Only affect frontend main product queries (shop, category, etc.) if ( is_admin() || ! $query->is_main_query() || ‘product’ !== $query->get( ‘post_type’ ) ) { return; } $user_id = get_current_user_id(); // Admins /…Continue reading
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