aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
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() {