| 1 |
<?php |
| 2 |
|
| 3 |
namespace Give\MigrationLog\Helpers; |
| 4 |
|
| 5 |
/** |
| 6 |
* Class Environment |
| 7 |
* @package Give\MigrationLog\Helpers |
| 8 |
* |
| 9 |
* @since 2.10.0 |
| 10 |
*/ |
| 11 |
class Environment |
| 12 |
{ |
| 13 |
/** |
| 14 |
* Check if current page is database updates page. |
| 15 |
* |
| 16 |
* @return bool |
| 17 |
*/ |
| 18 |
public static function isMigrationsPage() |
| 19 |
{ |
| 20 |
if ( ! isset($_GET['page'], $_GET['tab'])) { |
| 21 |
return false; |
| 22 |
} |
| 23 |
|
| 24 |
if ( |
| 25 |
'give-tools' === $_GET['page'] |
| 26 |
&& 'data' === $_GET['tab'] |
| 27 |
&& ( ! isset($_GET['section']) || 'database_updates' === $_GET['section']) |
| 28 |
) { |
| 29 |
return true; |
| 30 |
} |
| 31 |
|
| 32 |
return false; |
| 33 |
} |
| 34 |
} |
| 35 |
|