// HTTP Server Log / Kiri Vadivelu / 2026 // Log HTTP requests to a file define( ‘HTTP_LOG_FILE’, WP_CONTENT_DIR . ‘/http-requests.log’ ); function my_log_http_request( $response, $request, $url ) { $log_entry = [ ‘time’ => current_time( ‘mysql’ ), ‘method’ => $request[‘method’],…Continue reading
// SMTP Email Log / Kiri Vadivelu / 2026 // Register the Admin Menu add_action(‘admin_menu’, ‘register_all_menus’); function register_all_menus() { add_menu_page( ‘Email Log’, ‘Email Log’, ‘manage_options’, // Access for Admin Only ‘smtp-log’, ‘render_smtp_log_page’, ‘dashicons-email-alt’, 99 ); } // Render the Email…Continue reading
// Debug file loading / Kiri Vadivelu / 2026 error_log(‘FILE LOADED: ‘ . __FILE__);Continue reading
/** * Sugar Calendar: reset The Events Calendar migration so it can run again. * * Adds a “Reset TEC migration” notice on the WordPress Dashboard (Sugar Calendar hides * other plugins’ notices on its own screens). Clicking it: *…Continue reading
add_action( ‘wp’, function () { if ( ! function_exists( ‘is_checkout’ ) || ! is_checkout() ) { return; } $hook = ‘woocommerce_after_checkout_billing_form’; $callback = ‘kl_mobile_compliance_text’; $priority = has_action( $hook, $callback ); if ( false === $priority ) { return; } remove_action(…Continue reading
// 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 / 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
// 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
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