PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / trunk
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) vtrunk
1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 1.7.0.9 1.8.0 All 210 releases
charitable / includes / debugging / class-charitable-debugging.php

class-charitable-debugging.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) trunk, at includes/debugging/class-charitable-debugging.php

59 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Responsible for helping with debugging.
4 *
5 * @package Charitable/Classes/Charitable_Debugging
6 * @author David Bisset
7 * @copyright Copyright (c) 2023, WP Charitable LLC
8 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9 * @since 1.6.42
10 * @version 1.6.42
11 */
12
13 // Exit if accessed directly.
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit;
16 }
17
18 if ( ! class_exists( 'Charitable_Debugging' ) ) :
19
20 /**
21 * Charitable_Debugging
22 *
23 * @since 1.6.42
24 */
25 class Charitable_Debugging {
26
27 /**
28 * Create class object.
29 *
30 * @since 1.6.42
31 */
32 public function __construct() {
33 /**
34 * Automatically add Charitable's debugging constants when
35 * using the WP Debugging plugin.
36 */
37 add_filter( 'wp_debugging_add_constants', array( $this, 'add_debugging_constants' ) );
38 }
39
40 /**
41 * Add debugging constants.
42 *
43 * @since 1.6.42
44 *
45 * @param array $added_constants Collection of added constants.
46 * @return array
47 */
48 public function add_debugging_constants( $added_constants ) {
49 return array_merge(
50 $added_constants,
51 array(
52 'charitable_debug' => array( 'value' => 'true' )
53 )
54 );
55 }
56 }
57
58 endif;
59