Environment.php
32 lines
| 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 | * @since 1.0.0 |
| 17 | * @return bool |
| 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 |