-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfp_activate_plugin.php
More file actions
46 lines (33 loc) · 1.11 KB
/
Copy pathfp_activate_plugin.php
File metadata and controls
46 lines (33 loc) · 1.11 KB
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
<?php
global $fp_settings;
global $fp_version;
//delete options only after version 1.4
delete_option("fp_settings");
$fp_settings = get_option("fp_settings");
$defaults = array(
'version' => $fp_version,
'ptf_app_id' => "",
'ptf_api_key' => "",
'fp_post_types' => array("post" , "page"),
'fp_post_cat' => array("Uncategorized"),
'fp_all_posts' => "0",
'show_auth_btn' => true,
'msg_body' => "My new post on {SITE_NAME}",
'post_featured_image' => "featured",
'post_schedule' => "no",
'queue' => array(),
'session_data' => "",
'pages' => array(),
'global_pages' => array( "own"=> array("id" => "own" , "name" => "Own Timeline") ),
'automatic_posts' => "no",
'post_count' => 0,
);
//$fp_settings = wp_parse_args( $fp_settings, $defaults );
//updating new values
foreach($defaults as $key=>$default) {
if(!isset($fp_settings[$key])) {
$fp_settings[$key] = $default;
}
}
$fp_settings["version"] = $fp_version;
update_option( "fp_settings", $fp_settings );