Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter zeusent

    (@zeusent)

    I really need help with this… If you could tell me what line of code I can edit to make this thing trigger only on first publish and not later edits you would be my god! ??

    Plugin Author dtsolis

    (@dtsolis)

    Hello and thank you for your support!

    While editing a post, you’ll see on your right a metabox with ‘Simple Parse Push Notification’ title.
    By setting ‘Activate Push Notifications for this post ?’ option to NO, you’re ok. No push notification will be send.
    In order to change that from code, a quick and (quite) dirty way is to make the following changes on ‘simpleParsePS.php’ file.

    1. comment out line 81
    add_action('publish_'.$postType, 'simpar_send_post');

    2. add this code

    if ( $old_status == 'draft' && $new_status == 'publish' ) {
    	simpar_send_post($post->ID);
    }

    below the line 252
    function simpar_save_post($new_status, $old_status, $post) {

    I hope that helps!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disalbe push for editing a post’ is closed to new replies.