WordPress.org

Make WordPress Core

Ticket #2927: test1.php

File test1.php, 590 bytes (added by darkdragon, 7 years ago)

Place in folder called "test-plugin-folder". Use to test patch.

Line 
1<?php
2/*
3Plugin Name: Test 1 Plugin Management in folder
4Plugin URI: http://www.santosj.name
5Description: This is a test
6Author: Jacob Santos
7Version: 0.0
8Author URI: http://www.santosj.name
9 */
10
11function test1_pre_upgrade_hook($null)
12{
13        return true;
14}
15
16function 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
22add_filter('pre_upgrade_test-plugin-folder/test1.php', 'test1_pre_upgrade_hook');
23add_action('post_upgrade_test-plugin-folder/test1.php', 'test1_post_upgrade_hook');