Skip to content

Commit 01212ae

Browse files
committed
Merge pull request #503 from TGMPA/feature/issue-469
Updated the example file with examples for different include situations.
2 parents a6a0b3a + c981b5d commit 01212ae

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

example.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,22 @@
1919

2020
/**
2121
* Include the TGM_Plugin_Activation class.
22+
*
23+
* Depending on your implementation, you may want to change the include call:
24+
*
25+
* Parent Theme:
26+
* require_once get_template_directory() . '/path/to/class-tgm-plugin-activation.php';
27+
*
28+
* Child Theme:
29+
* require_once get_stylesheet_directory() . '/path/to/class-tgm-plugin-activation.php';
30+
*
31+
* Plugin:
32+
* require_once dirname( __FILE__ ) . '/path/to/class-tgm-plugin-activation.php';
2233
*/
2334
require_once dirname( __FILE__ ) . '/class-tgm-plugin-activation.php';
2435

2536
add_action( 'tgmpa_register', 'my_theme_register_required_plugins' );
37+
2638
/**
2739
* Register the required plugins for this theme.
2840
*

0 commit comments

Comments
 (0)