Elementor LCP Font Preloader

/** * Critical Font Preloader for Elementor Sites v1.1 * Dynamically detects and preloads locally-hosted fonts */ if (!defined(‘ABSPATH’)) exit; define(‘CFPL_CACHE_DURATION’, 86400); define(‘CFPL_MAX_FONTS’, 6); define(‘CFPL_PRELOAD_EICONS’, true); add_action(‘wp_head’, ‘cfpl_output_font_preloads’, 1); function cfpl_output_font_preloads() { if (is_admin()) { return; } $cache_key = ‘cfpl_fonts_v1’;…Continue reading

Beveiliging tegen onaangekondigde verhuizing

/** * Pixelsz – Site Lock. Dit is ervoor bedoeld dat een website zonder overleg wordt verhuisd naar aan andere server. Hierdoor kunnen wij de licenties die gratis worden verstrekt bij een beheer en onderhoudscontract niet verwijderen voor de verhuizing…Continue reading

Php generatore completo

// 1. GESTIONE AZIONI AJAX add_action(‘wp_ajax_generate_kitchen_image’, ‘generate_kitchen_image_handler’); add_action(‘wp_ajax_nopriv_generate_kitchen_image’, ‘generate_kitchen_image_handler’); function generate_kitchen_image_handler() { // Pulizia iniziale per evitare testi sporchi nel JSON if (ob_get_length()) ob_clean(); header(‘Content-Type: application/json’); header(“Access-Control-Allow-Origin: *”); // — LA TUA CHIAVE API (METTILA QUI SOTTO) — $api_key =…Continue reading

WPCode Snippet: MU-Plugins Sync Engine

/** * WPCode Snippet: MU-Plugins Sync Engine * Description: Synchronizes MU-Plugins FROM /wp-content/mu-plugins/ TO wpcode_snippets_sync CPT * Location: Run Everywhere * Priority: 25 * * INSTALL ORDER: #6 – Install AFTER the WPCode sync system is fully set up *…Continue reading

terminal-waiting-system

/** * Plugin Name: Terminal Waiting System * Description: Terminal queue system with departure/arrival time controls, vehicle coding, roles (admin/driver/passenger), and privacy policy. * Version: 1.0.0 * Author: Your Name * License: GPL2+ */ if (!defined(‘ABSPATH’)) exit; const VERSION =…Continue reading

Untitled Snippet

function vqs_leaderboard_assets() { wp_enqueue_style( ‘vqs-leaderboard-css’, get_stylesheet_directory_uri() . ‘/vqs-leaderboard.css’, [], ‘1.0’ ); wp_enqueue_script( ‘vqs-leaderboard-js’, get_stylesheet_directory_uri() . ‘/vqs-leaderboard.js’, [], ‘1.0’, true ); } add_action(‘wp_enqueue_scripts’, ‘vqs_leaderboard_assets’); function vqs_leaderboard_shortcode() { ob_start(); ?> Monthly Leaderboard Race Top players — live updated 00d 00h 00m 00s…Continue reading

Duplicate Posts and Pages (copy)

// Add the duplicate link to action list for post_row_actions // for “post” and custom post types add_filter( ‘post_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); // for “page” post type add_filter( ‘page_row_actions’, ‘rd_duplicate_post_link’, 10, 2 ); function rd_duplicate_post_link( $actions, $post ) {…Continue reading

[DO NOT PUSH] AutomateWoo Function to Swap Subscription Product by SKU

if ( ! function_exists( ‘rd_swap_products_on_subscription’ ) ) { function rd_swap_products_on_subscription( $workflow ) { // Map old SKU => new SKU (simple products only; untested with variable/bundled) $sku_mapping = array( ‘9359769001492’ => ‘9359769002352’, // Nando’s Chicken Bowl ‘9359769002277’ => ‘9359769002369’, //…Continue reading