FRS Updated KPI Charts

/* === 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

/** * 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

/** * 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

FRS Advanced Stats

/** * 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 Monthly Counts

/** * 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

Proceso de Orla

/** * 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 data-attr to links

function add_data_attributes_to_content_links( $content ) { if ( class_exists( ‘DOMDocument’ ) ) { // Use the mb_convert_encoding to handle different character sets correctly // and suppress HTML errors with the @ operator and LIBXML options. $dom = new DOMDocument(); @$dom->loadHTML( mb_convert_encoding(…Continue reading