PHP-snippet: registratie lessen verwerken en AJAX endpoint

// Configuratie function get_parameters_36(): array { return [ “target_page_slug” => “lesrooster-evenemententeam-2025”, “tablepress_table_id” => 36 ]; } /** * Probeer een (Nederlandse) datum-string te parsen naar een DateTime in Europe/Amsterdam. * Retourneert DateTime of false als parsing mislukt. */ function etb_parse_datum_to_datetime($datum)…Continue reading

Complete Canvas Solution

// Intercept as early as possible – right when form is submitted add_action(‘wp_loaded’, ‘intercept_canvas_early’); function intercept_canvas_early() { // Check if this is an add-to-cart request with our canvas if (isset($_POST[‘add-to-cart’]) && isset($_POST[‘wpo_live_preview_image’])) { $canvas = $_POST[‘wpo_live_preview_image’]; if (!empty($canvas) && strpos($canvas,…Continue reading

Debug Canvas Cart

// DEBUG: Check if canvas is in cart add_action(‘woocommerce_after_cart_table’, ‘debug_canvas_in_cart’); function debug_canvas_in_cart() { echo ‘ ‘; echo ‘ 🔍 DEBUG: Canvas Data Check ‘; foreach (WC()->cart->get_cart() as $key => $item) { echo ‘ Product: ‘ . $item[‘data’]->get_name() . ‘‘; if…Continue reading

Add subtitle meta box to post editor

// Add subtitle meta box to post editor function add_subtitle_meta_box() { add_meta_box( ‘post_subtitle’, ‘Subtitle’, ‘subtitle_meta_box_callback’, ‘post’, ‘normal’, ‘high’ ); } add_action(‘add_meta_boxes’, ‘add_subtitle_meta_box’); // Display the subtitle field function subtitle_meta_box_callback($post) { wp_nonce_field(‘save_subtitle’, ‘subtitle_nonce’); $value = get_post_meta($post->ID, ‘_post_subtitle’, true); echo ‘‘; }…Continue reading

Word count and subtitle

// Add subtitle meta box to post editor function add_subtitle_meta_box() { add_meta_box( ‘post_subtitle’, ‘Subtitle’, ‘subtitle_meta_box_callback’, ‘post’, ‘normal’, ‘high’ ); } add_action(‘add_meta_boxes’, ‘add_subtitle_meta_box’); // Display the subtitle field function subtitle_meta_box_callback($post) { wp_nonce_field(‘save_subtitle’, ‘subtitle_nonce’); $value = get_post_meta($post->ID, ‘_post_subtitle’, true); echo ‘‘; }…Continue reading

Fetchpriority Logo

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