Skip to content

Commit

Permalink
Nomination bookmarklet item_author should always trump #932
Browse files Browse the repository at this point in the history
  • Loading branch information
AramZS committed Jul 15, 2019
1 parent dfd2b2d commit d9a8a87
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Core/Utility/Forward_Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,9 @@ public function bookmarklet_to_nomination( $item_id = false, $post ) {
// $this->metas->handle_item_tags( $post_ID, $tags );
$nominators = $this->apply_nomination_data( $post_ID );
$this->metas->update_pf_meta( $post_ID, 'nominator_array', $nominators );
if ( !empty( $_POST['item_author'] ) ) {
pressforward( 'controller.metas' )->update_pf_meta( $post_ID, 'item_author', \sanitize_text_field($_POST['item_author']) );
}
return $post_ID;
} else {
// Do something with the returned ID.
Expand All @@ -591,9 +594,9 @@ public function bookmarklet_to_nomination( $item_id = false, $post ) {
// If this is a nomination but has not yet been published, assume bookmarklet has best version of content
if (false != $post_check){
$this->item_interface->update_post( $post );
if ( !empty( $_POST['item_author'] ) ) {
pressforward( 'controller.metas' )->update_pf_meta( $nom_and_post_check, 'item_author', \sanitize_text_field($_POST['item_author']) );
}
}
if ( !empty( $_POST['item_author'] ) ) {
pressforward( 'controller.metas' )->update_pf_meta( $nom_and_post_check, 'item_author', \sanitize_text_field($_POST['item_author']) );
}
return $nom_and_post_check;
}
Expand Down

0 comments on commit d9a8a87

Please sign in to comment.