source: trunk/www.guidonia.net/wp/wp-content/plugins/ferdinand-wordbook/mf_action.php@ 44

Last change on this file since 44 was 44, checked in by luciano, 14 years ago
File size: 1.9 KB
Line 
1<?php
2define('WP_ADMIN', TRUE);
3require_once('../../../wp-load.php');
4require_once(ABSPATH . 'wp-admin/includes/admin.php');
5require_once('lib.php');
6
7$mfposts = $_POST['mfposts'];
8$mfposts = (isset($mfposts) && $mfposts == "on") ? 'Y' : 'N';
9
10$mfeposts = $_POST['mfeposts'];
11$mfeposts = (isset($mfeposts) && $mfeposts == "on") ? 'Y' : 'N';
12
13$mfcomment = $_POST['mfcomment'];
14$mfcomment = (isset($mfcomment) && $mfcomment == "on") ? 'Y' : 'N';
15
16 if (!get_option('facebook_minifeed_posts'))
17 {
18 add_option("facebook_minifeed_posts", $mfposts, '', 'yes');
19 } else {
20 update_option("facebook_minifeed_posts", $mfposts, '', 'yes');
21 }
22
23 if (!get_option('facebook_minifeed_edit_posts'))
24 {
25 add_option("facebook_minifeed_edit_posts", $mfeposts, '', 'yes');
26 } else {
27 update_option("facebook_minifeed_edit_posts", $mfeposts, '', 'yes');
28 }
29
30 if (!get_option('facebook_minifeed_comments'))
31 {
32 add_option("facebook_minifeed_comments", $mfcomment, '', 'yes');
33 } else {
34 update_option("facebook_minifeed_comments", $mfcomment, '', 'yes');
35 }
36
37$postformat = $_POST['post-format'];
38 if (!get_option('facebook_minifeed_postformat'))
39 {
40 add_option("facebook_minifeed_postformat", $postformat, '', 'yes');
41 } else {
42 update_option("facebook_minifeed_postformat", $postformat, '', 'yes');
43 }
44
45$epostformat = $_POST['edit-post-format'];
46 if (!get_option('facebook_minifeed_edit_postformat'))
47 {
48 add_option("facebook_minifeed_edit_postformat", $epostformat, '', 'yes');
49 } else {
50 update_option("facebook_minifeed_edit_postformat", $epostformat, '', 'yes');
51 }
52
53
54$commentformat = $_POST['comment-format'];
55 if (!get_option('facebook_minifeed_commentformat'))
56 {
57 add_option("facebook_minifeed_commentformat", $commentformat, '', 'yes');
58 } else {
59 update_option("facebook_minifeed_commentformat", $commentformat, '', 'yes');
60 }
61
62
63header('Location:'.$_POST['_wp_http_referer']);
64?>
Note: See TracBrowser for help on using the repository browser.