-
Notifications
You must be signed in to change notification settings - Fork 2
/
hdfys_update.php
88 lines (80 loc) · 1.95 KB
/
hdfys_update.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?php
/**
* Update Process
*
* @package Hello Dolly For Your Song
* @since 0.17
*/
// Avoids code execution if WordPress is not loaded (Security Measure)
if (!defined('ABSPATH'))
{
exit;
}
/**
* Run the update process.
*
* @since 0.7
*/
function hdfys_update () {
$hdfys_previous_version = get_option('hdfys_version');
/* Update Process Version 0.7 */
if($hdfys_previous_version==false) {
add_option('hdfys_activated',"1");
add_option('hdfys_version', "7");
$lyrics = get_option('hdfys_song');
$lyrics = stripcslashes($lyrics);
update_option('hdfys_song',$lyrics);
}
/* Update Process Version 0.8 */
if($hdfys_previous_version==7) {
update_option('hdfys_version','8');
}
/* Update Process Version 0.9 */
if($hdfys_previous_version==8) {
update_option('hdfys_version','9');
add_option('hdfys_admin_lyric',"1");
}
/* Update Process Version 0.10 */
if($hdfys_previous_version==9) {
update_option('hdfys_version','10');
}
/* Update Process Version 0.11 */
if($hdfys_previous_version==10) {
update_option('hdfys_version','11');
}
/* Update Process Version 0.12 */
if($hdfys_previous_version==11) {
update_option('hdfys_version','12');
}
/* Update Process Version 0.13 */
if($hdfys_previous_version==12) {
update_option('hdfys_version','13');
add_option('hdfys_text_updated',"0");
}
/* Update Process Version 0.14 */
if($hdfys_previous_version==13) {
update_option('hdfys_version','14');
}
/* Update Process Version 0.15 */
if($hdfys_previous_version==14) {
update_option('hdfys_version','15');
}
/* Update Process Version 0.16 */
if($hdfys_previous_version==15) {
update_option('hdfys_version','16');
}
/* Update Process Version 0.17 */
if($hdfys_previous_version==16) {
update_option('hdfys_version','17');
}
/* Update Process Version 0.18 */
if($hdfys_previous_version==17) {
update_option('hdfys_version','18');
}
/* Update Process Version 0.19 */
if($hdfys_previous_version==18) {
update_option('hdfys_version','19');
}
}
add_action( 'plugins_loaded', 'hdfys_update' );
?>