Skip to content

Commit

Permalink
use ABSPATH rather than WPINC
Browse files Browse the repository at this point in the history
  • Loading branch information
luizbills committed Jul 18, 2023
1 parent 7fa3316 commit 5fda45b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config.dev.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined( 'WPINC' ) || exit( 1 );
defined( 'ABSPATH' ) || exit( 1 );

return [
'CACHE_ENABLED' => false,
Expand Down
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined( 'WPINC' ) || exit( 1 );
defined( 'ABSPATH' ) || exit( 1 );

return [
'SLUG' => 'your_plugin_slug',
Expand Down
2 changes: 1 addition & 1 deletion dependencies.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use Your_Namespace\Helpers as h;

defined( 'WPINC' ) || exit( 1 );
defined( 'ABSPATH' ) || exit( 1 );

// Each index of `$deps` array must be a array with 'check' and 'message'
// 'check' must be a callable or a string
Expand Down
2 changes: 1 addition & 1 deletion loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Your_Namespace;

defined( 'WPINC' ) || exit( 1 );
defined( 'ABSPATH' ) || exit( 1 );

return [
[ Sample_Class::class, 10 ], // 10 is priority
Expand Down
2 changes: 1 addition & 1 deletion main.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/

// prevents your PHP files from being executed via direct browser access
defined( 'WPINC' ) || exit( 1 );
defined( 'ABSPATH' ) || exit( 1 );

// uncomment below to load your plugin translations
// load_plugin_textdomain( 'your_text_domain', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
Expand Down

0 comments on commit 5fda45b

Please sign in to comment.