// 1. Algoritmo de Luhn para validar que el IMEI sea real (15 dígitos) function myceluya_validar_imei($imei) { $imei = preg_replace(‘/[^0-9]/’, ”, $imei); if (strlen($imei) !== 15) return false; $sum = 0; for ($i = 0; $i < 15; $i++) {…Continue reading
// Allowed Referrer Page / Kiri Vadivelu / 2026 add_action(‘template_redirect’, function() { // ID of the page to protect eg. Thank You page if (!is_page(123)) { return; } // URL of the allowed referring page if (wp_get_referer() === ‘https://yoursite.com/form-page/’) {…Continue reading
// Exclude Cache Page / Kiri Vadivelu / 2026 function exclude_cache_page() { $excluded_urls = array( ‘/client-portal/’, ‘/checkout/’, ‘/cart/’, ); $uri = parse_url( $_SERVER[‘REQUEST_URI’], PHP_URL_PATH ); foreach ( $excluded_urls as $url ) { if ( strpos( $uri, $url ) !== false…Continue reading
// Exclude Caching Page / Kiri Vadivelu / 2026 function exclude_caching_page() { $excluded_pages = array( 6, 57, 103 ); // ← your page IDs here if ( is_page( $excluded_pages ) ) { if ( ! defined( ‘DONOTCACHEPAGE’ ) ) {…Continue reading
if ( ! defined( ‘ABSPATH’ ) ) exit; function fso_render_shortcode( $atts ) { $atts = shortcode_atts( array( ‘icon_size’ => ’24’, ‘bg_color’ => ‘#f2f2f2’, ), $atts, ‘fullscreen_search’ ); $icon_size = absint( $atts[‘icon_size’] ); $bg_color = sanitize_hex_color( $atts[‘bg_color’] ) ? $atts[‘bg_color’] :…Continue reading
/** * Bloquear la enumeración de usuarios (WPCode: tipo PHP, “Ejecutar en todas partes”) * * Solo afecta a visitantes SIN sesión iniciada: el editor de bloques, Elementor * y el panel siguen usando /wp/v2/users con normalidad. * * Opción:…Continue reading
/** * Let staff view the WP Mail SMTP Email Log and read sent emails, without being able * to delete, resend or export logs. * Edition: Pro (email logs are a Pro feature). Change ‘edit_others_posts’ to the * capability…Continue reading
/** * WPCode-Snippet (Shortcode): ein Beitrag als Teaser-Karte für konradin-v2. * Attribute: auswahl (id|thema), id, keywords, debug */ // Attribute absichern – fehlt eines in der WPCode-Liste, gibt es sonst Warnungen $auswahl = isset( $auswahl ) ? (string) $auswahl :…Continue reading