Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Commit

Permalink
Update when the save_post hook is run, because that was not done in #47
Browse files Browse the repository at this point in the history
This fixes the issue described in #57, where the URL parameter ds_npr_update_push was removed along with the 'Push to NPR' submit button, but the URL parameter triggering the nprstory_api_push function was not changed.
  • Loading branch information
benlk committed Sep 26, 2018
1 parent 66e4e9d commit 8dc1adc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion push_story.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function nprstory_api_delete ( $post_ID ) {
* Register nprstory_npr_push and nprstory_npr_delete on appropriate hooks
* this is where the magic happens
*/
if ( isset( $_POST['ds_npr_update_push'] ) ) {
if ( isset( $_POST['send_to_api'] ) ) {
// No need to validate the ds_npr_update_push contents; we're checking only for its existence
// permissions check is handled by nprstory_api_push
add_action( 'save_post', 'nprstory_api_push', 10, 2 );
Expand Down

0 comments on commit 8dc1adc

Please sign in to comment.