Simple HTTP Debug

// Simple HTTP Debug / Kiri Vadivelu / 2026 function simple_http_debug( $response, $context, $class, $parsed_args, $url ) { error_log( ‘http_debug: ‘.$url ); } add_action(‘http_api_debug’, ‘simple_http_debug’, 10, 5);Continue reading

Admin Debug Log

// Admin Debug Log / Kiri Vadivelu / 2026 add_action( ‘admin_menu’, function () { add_menu_page( ‘Debug Log’, ‘Debug Log’, ‘manage_options’, ‘view-debug-log’, ‘render_debug_log_page’, ‘dashicons-clipboard’, 99 ); }); function render_debug_log_page() { $log_file = WP_CONTENT_DIR . ‘/debug.log’; if ( ! file_exists( $log_file )…Continue reading

myceluya_imei_checker

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

Modal Google Search

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

FC – Bloquear enumeración de usuarios

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

Custom Gmail SMTP

// Custom Gmail SMTP / Kiri Vadivelu / 2026 add_action(‘phpmailer_init’, ‘send_gmail_smtp’); function send_gmail_smtp($phpmailer) { $phpmailer->isSMTP(); $phpmailer->Host = ‘smtp.gmail.com’; $phpmailer->SMTPAuth = true; $phpmailer->Port = 587; // Use 465 for SSL, 587 for TLS $phpmailer->SMTPSecure = ‘tls’; // ‘ssl’ for port 465…Continue reading

woff-Dateien hochladen

/** * Erlaubt WOFF/WOFF2 Uploads in WordPress und macht sie für Divi Custom Fonts nutzbar. * Updatefest über WPCode. */ /** 1) WordPress: MIME Types für Uploads erweitern */ add_filter(‘upload_mimes’, function ($mimes) { $mimes[‘woff’] = ‘font/woff’; $mimes[‘woff2’] = ‘font/woff2’; return…Continue reading

Change From Email

// Change From Email / Kiri Vadivelu / 2026 add_filter( ‘wp_mail_from’, function ( $old ) { return ‘[email protected]’; // Replace with your email } ); add_filter( ‘wp_mail_from_name’, function ( $old ) { return ‘Super Dev’; // Replace with your name…Continue reading

WC Vendors – Show the “AI” overlay on the product image

// Add an “AI used” checkbox to the vendor’s own product edit form, after Tax Class (General tab) add_action( ‘wcv_product_options_tax’, function( $post_id ) { \WC_Vendors\Classes\Front\WCV_Form_Helper::input( array( ‘id’ => ‘_wcv_ai_generated’, ‘post_id’ => $post_id, ‘type’ => ‘checkbox’, ‘label’ => __( ‘This product…Continue reading