WordPress.org

Ready to get started?Download WordPress

Forums

Peter's Collaboration E-mails
[resolved] Remove approver_user_id (2 posts)

  1. Adam Capriola
    Member
    Posted 1 year ago #

    I personally don't need the approver_user_id saved in my database, so I just came up with this code to remove it:

    /**
     * Remove Peter's Collaboration Emails approver_user_id
     *
     */
    add_filter( 'transition_post_status', 'ac_delete_approver_user_id', 11, 3 );
    
    function ac_delete_approver_user_id( $new_status, $old_status, $post ) {
    
    	if ( ( 'pending' == $old_status && 'future' == $new_status ) || ( 'pending' == $old_status && 'publish' == $new_status ) ) {
    
    		delete_post_meta( $post->ID, 'approver_user_id' );
    
    	}
    
    }

    It's untested at the moment, but should work. Just throwing it out there incase anyone else doesn't want approver_user_id in their postmeta tables either.

    http://wordpress.org/extend/plugins/peters-collaboration-e-mails/

  2. Peter
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for sharing! I should make that optional in a future release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.