Plugin Directory

Changeset 762486

Timestamp:
08/26/2013 02:57:46 PM (11 years ago)
Author:
tmoorewp
Message:

Revert 761460. Need to find a different way to do this so we don't break other modules (Notifications in this case).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/subscriptions.php

    r761460 r762486  
    7474        add_action( 'comment_form', array( $this, 'comment_subscribe_init' ) );
    7575
    76         // Catch comment posts or approvals; check for subscriptions.
    77         add_action( 'comment_post',                   array( $this, 'comment_subscribe_submit' ),        50, 2 );
    78         add_action( 'comment_unapproved_to_approved', array( $this, 'comment_subscribe_on_transition' ), 50, 2 );
     76        // Catch comment posts and check for subscriptions.
     77        add_action( 'comment_post', array( $this, 'comment_subscribe_submit' ), 50, 2 );
    7978    }
    8079
     
    464463
    465464    /**
    466     * Jetpack_Subscriptions::comment_subscribe_submit()
    467     *
    468     * When a user checks the comment subscribe box and submits a comment, subscribe them to the comment thread.
    469     */
    470     function comment_subscribe_submit( $comment_id, $approved ) {
    471         if ( 1 !== $approved || 'approve' !== $approved ) { // if the comment is not approved, spam, or held, do not sync it
     465    it()
     466    *
     467    * When a user checks the comment subscribe box and submits a comment, subscribe them to the comment thread.
     468    */
     469    function comment_subscribe_submit( $comment_id, $approved ) {
     470        if (
    472471            return;
    473472        }
     
    476475        $this->set_cookies( isset( $_REQUEST['subscribe_comments'] ), isset( $_REQUEST['subscribe_blog'] ) );
    477476
    478         if ( !isset( $_REQUEST['subscribe_comments'] ) && !isset( $_REQUEST['subscribe_blog'] ) )
     477       if ( !isset( $_REQUEST['subscribe_comments'] ) && !isset( $_REQUEST['subscribe_blog'] ) )
    479478            return;
    480479
     
    489488
    490489        Jetpack_Subscriptions::subscribe( $comment->comment_author_email, $post_ids );
    491     }
    492 
    493     function comment_subscribe_on_transition( $comment_id, $comment ) {
    494         if ( ! is_object( $comment ) )
    495             return;
    496            
    497         Jetpack_Subscriptions::comment_subscribe_submit( (int) $comment_id, $comment->comment_approved );
    498     }
     490     }
    499491
    500492    /**
Note: See TracChangeset for help on using the changeset viewer.