Skip to content

Commit 89b0b9a

Browse files
committed
Add ABSPATH check in Init.php and main plugin file
1 parent bd640be commit 89b0b9a

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/Init.php

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

88
namespace HappyPrime\ThemeImageBlock;
99

10+
if ( ! defined( 'ABSPATH' ) ) {
11+
exit;
12+
}
13+
1014
/**
1115
* Initialize the plugin.
1216
*/

theme-image-block.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222

2323
const BLOCKS_DIR = __DIR__ . '/blocks';
2424

25-
// If this file is called directly, abort.
26-
if ( ! defined( 'WPINC' ) ) {
27-
die;
25+
if ( ! defined( 'ABSPATH' ) ) {
26+
exit;
2827
}
2928

3029
require_once __DIR__ . '/vendor/autoload.php';

0 commit comments

Comments
 (0)