PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 3.0.60
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v3.0.60
5.6.2 5.6.3 5.6.1 5.6.0 5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 3.0.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.51 3.0.60 3.0.61 3.0.62 All 38 releases
double-opt-in / core / Debug.php

Debug.php in Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification 3.0.60, at core/Debug.php

25 lines 741 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Function: f12_debug_log
4 * Version: 1.0.0
5 * Description: Logs debug messages to the error log if WP_DEBUG is enabled. Optionally includes context data.
6 */
7 if (!function_exists('f12_debug_log')) {
8 /**
9 * Logs a debug message with optional context.
10 *
11 * @param string $message The debug message to log.
12 * @param array $context Additional context data to include in the log (optional).
13 * @return void
14 */
15 function f12_debug_log(string $message, array $context = []): void
16 {
17 if (!defined('WP_DEBUG') || WP_DEBUG !== true) {
18 return;
19 }
20
21 $context_str = !empty($context) ? json_encode($context) : '';
22 $log_entry = sprintf("%s %s\n", $message, $context_str);
23 error_log($log_entry);
24 }
25 }