Skip to content
This repository has been archived by the owner on Oct 13, 2022. It is now read-only.

Added security check if file is accessed directly #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions acf-FIELD_NAME-v4.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;

class acf_field_FIELD_NAME extends acf_field {

Expand Down
2 changes: 2 additions & 0 deletions acf-FIELD_NAME-v5.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;

class acf_field_FIELD_NAME extends acf_field {

Expand Down
3 changes: 2 additions & 1 deletion acf-FIELD_NAME.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
*/



// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;

// 1. set text domain
// Reference: https://codex.wordpress.org/Function_Reference/load_plugin_textdomain
Expand Down