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
This commit is contained in:
parent
ef53c72a70
commit
64b71a231b
@ -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,9 +218,7 @@ 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');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user