PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.1.0
GiveWP – Donation Plugin and Fundraising Platform v4.1.0
4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 All 253 releases
give / src / Log / Helpers / Environment.php

Environment.php in GiveWP – Donation Plugin and Fundraising Platform 4.1.0, at src/Log/Helpers/Environment.php

52 lines 909 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Give\Log\Helpers;
4
5 /**
6 * Helper class responsible for checking the environment.
7 * @package Give\Log\Helpers
8 *
9 * @since 2.10.0
10 */
11 class Environment
12 {
13 /**
14 * Check if current page is logs page.
15 *
16 * @return bool
17 * @since 1.0.0
18 */
19 public static function isLogsPage()
20 {
21 if (!isset($_GET['page'], $_GET['tab'])) {
22 return false;
23 }
24
25 if ('give-tools' === $_GET['page'] && 'logs' === $_GET['tab']) {
26 return true;
27 }
28
29 return false;
30 }
31
32 /**
33 * @since 2.18.0
34 *
35 * @return bool
36 */
37 public static function isWPDebugLogEnabled()
38 {
39 return defined('WP_DEBUG_LOG') && WP_DEBUG_LOG;
40 }
41
42 /**
43 * @since 2.19.6
44 *
45 * @return bool
46 */
47 public static function isGiveDebugEnabled()
48 {
49 return defined('GIVE_DEBUG') && GIVE_DEBUG;
50 }
51 }
52