| 1 | <?php |
|---|
| 2 | /* |
|---|
| 3 | Plugin Name: Test 1 Plugin Management in folder |
|---|
| 4 | Plugin URI: http://www.santosj.name |
|---|
| 5 | Description: This is a test |
|---|
| 6 | Author: Jacob Santos |
|---|
| 7 | Version: 0.0 |
|---|
| 8 | Author URI: http://www.santosj.name |
|---|
| 9 | */ |
|---|
| 10 | |
|---|
| 11 | function test1_pre_upgrade_hook($null) |
|---|
| 12 | { |
|---|
| 13 | return true; |
|---|
| 14 | } |
|---|
| 15 | |
|---|
| 16 | function test1_post_upgrade_hook($pre_hook_result) |
|---|
| 17 | { |
|---|
| 18 | echo "Pre upgrade Hook Result should have been true, it is: "; |
|---|
| 19 | var_dump($pre_hook_result); |
|---|
| 20 | } |
|---|
| 21 | |
|---|
| 22 | add_filter('pre_upgrade_test-plugin-folder/test1.php', 'test1_pre_upgrade_hook'); |
|---|
| 23 | add_action('post_upgrade_test-plugin-folder/test1.php', 'test1_post_upgrade_hook'); |
|---|