Skip to content

Commit a9cae85

Browse files
committed
Added direct access guards
1 parent a1609a9 commit a9cae85

File tree

9 files changed

+28
-0
lines changed

9 files changed

+28
-0
lines changed

inc/tgm-config.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<?php
2+
3+
if( ! defined( 'ABSPATH' ) )
4+
return;
5+
26
require_once dirname( __FILE__ ) . '/class-tgm-plugin-activation.php';
37

48
add_action( 'tgmpa_register', 'wpcf7_pdf_forms_register_required_plugins' );

migrations/0.2.4.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
if( ! defined( 'ABSPATH' ) )
4+
return;
5+
36
if( ! class_exists('WPCF7') )
47
return;
58

migrations/1.3.16.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
if( ! defined( 'ABSPATH' ) )
4+
return;
5+
36
if( ! class_exists('WPCF7') )
47
return;
58

modules/downloads.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
if( ! defined( 'ABSPATH' ) )
4+
return;
5+
36
if( ! class_exists( 'WPCF7_Pdf_Forms_Downloads' ) )
47
{
58
class WPCF7_Pdf_Forms_Downloads

modules/pdf-ninja.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
if( ! defined( 'ABSPATH' ) )
4+
return;
5+
36
class WPCF7_Pdf_Ninja extends WPCF7_Pdf_Forms_Service
47
{
58
private static $instance = null;

modules/service.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
if( ! defined( 'ABSPATH' ) )
4+
return;
5+
36
abstract class WPCF7_Pdf_Forms_Service extends WPCF7_Service
47
{
58
public function api_get_fields( $attachment_id )

modules/storage.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
if( ! defined( 'ABSPATH' ) )
4+
return;
5+
36
if( ! class_exists( 'WPCF7_Pdf_Forms_Storage' ) )
47
{
58
class WPCF7_Pdf_Forms_Storage

pdf-forms-for-contact-form-7.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
1515
*/
1616

17+
if( ! defined( 'ABSPATH' ) )
18+
return;
19+
1720
require_once untrailingslashit( dirname( __FILE__ ) ) . '/inc/tgm-config.php';
1821

1922
if( ! class_exists( 'WPCF7_Pdf_Forms' ) )

wpcf7-pdf-forms.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<?php
22

3+
if( ! defined( 'ABSPATH' ) )
4+
return;
5+
36
// this file is needed for smooth upgrades from pre-1.2 versions to 1.2.0 and later versions
47
// it fixes a plugin deactivation on upgrade issue due to main plugin php file rename
58

0 commit comments

Comments
 (0)