aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-11-26 18:33:49 -0800
committerfriendica <info@friendica.com>2013-11-26 18:33:49 -0800
commit64b71a231b9f8e01490b78316205923c77c68c48 (patch)
tree4252297ce122547ee2d2046da163a8f3379f99e4 /util
parentef53c72a708ed2b1ba4cc1ffc6a926a33ba6a2f2 (diff)
downloadvolse-hubzilla-64b71a231b9f8e01490b78316205923c77c68c48.tar.gz
volse-hubzilla-64b71a231b9f8e01490b78316205923c77c68c48.tar.bz2
volse-hubzilla-64b71a231b9f8e01490b78316205923c77c68c48.zip
link the plugins at both ends so that each can discover a post that was imported/exported to/from the other and keep track of updates accordingly
Diffstat (limited to 'util')
-rw-r--r--util/wp/post_to_red/post_to_red.php17
1 files changed, 6 insertions, 11 deletions
diff --git a/util/wp/post_to_red/post_to_red.php b/util/wp/post_to_red/post_to_red.php
index d89ab91be..55177238d 100644
--- a/util/wp/post_to_red/post_to_red.php
+++ b/util/wp/post_to_red/post_to_red.php
@@ -59,14 +59,11 @@ function post_to_red_post($post_id) {
$post = get_post($post_id);
if (isset($_POST['post_to_red'])) {
- update_post_meta($post_id, 'post_to_red', 1);
- } else {
- update_post_meta($post_id, 'post_to_red', 0);
- }
-
+ update_post_meta($post_id, 'post_to_red', '1');
+ }
// if meta has been set
- if (get_post_meta($post_id, "post_to_red", true) == 1) {
+ if (get_post_meta($post_id, "post_to_red", true) === '1') {
$user_name = post_to_red_get_acct_name();
$password = post_to_red_get_password();
@@ -122,7 +119,7 @@ function post_to_red_delete_post($post_id) {
$post = get_post($post_id);
// if meta has been set
- if (get_post_meta($post_id, "post_to_red", true) == 1) {
+ if (get_post_meta($post_id, "post_to_red", true) == '1') {
$user_name = post_to_red_get_acct_name();
$password = post_to_red_get_password();
@@ -221,10 +218,8 @@ function post_to_red_post_field_data($post_id) {
// now store data in custom fields based on checkboxes selected
if (isset($_POST['post_to_red'])) {
- update_post_meta($post_id, 'post_to_red', 1);
- } else {
- update_post_meta($post_id, 'post_to_red', 0);
- }
+ update_post_meta($post_id, 'post_to_red', '1');
+ }
}
function post_to_red_display_admin_page() {