Skip to content

Commit 2e38df3

Browse files
committed
Prevent direct file access
For some reason Plugin Check trips on these specific files.
1 parent 6d02783 commit 2e38df3

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed

src/AdminBar.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
namespace StaticDeploy;
44

5+
if ( ! defined( 'ABSPATH' ) ) {
6+
exit;
7+
}
8+
59
use Aws\Exception\AwsException;
610

711
class AdminBar {

src/Crawler.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
namespace StaticDeploy;
1010

11+
if ( ! defined( 'ABSPATH' ) ) {
12+
exit;
13+
}
14+
1115
use GuzzleHttp\Client;
1216
use GuzzleHttp\Psr7\Request;
1317
use GuzzleHttp\Psr7\Response;

src/DeployerTrait.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
namespace StaticDeploy;
44

5+
if ( ! defined( 'ABSPATH' ) ) {
6+
exit;
7+
}
8+
59
trait DeployerTrait {
610
public static function registerHooks(): void {
711
add_filter(

src/OptionsControllerTrait.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
namespace StaticDeploy;
44

5+
if ( ! defined( 'ABSPATH' ) ) {
6+
exit;
7+
}
8+
59
/*
610
* Trait for controllers that manage a set of options
711
* and an options page.

src/WordPressAdmin.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
namespace StaticDeploy;
1111

12+
if ( ! defined( 'ABSPATH' ) ) {
13+
exit;
14+
}
15+
1216
use YahnisElsts\PluginUpdateChecker\v5\PucFactory;
1317

1418
class WordPressAdmin {

0 commit comments

Comments
 (0)