bbp_favorites_handler

  • do_action( 'bbp_favorites_handler', $success, $user_id, $topic_id, $action )

    Source Reference:

    • Component: bbPress:: bbp-user
      File: /bbp-includes/bbp-user-functions.php :: Trac Source Line: 421
      	if ( !empty( $topic_id ) && !empty( $user_id ) && ( !bbp_has_errors() ) ) {
      
      		if ( $is_favorite && 'bbp_favorite_remove' == $action ) {
      			$success = bbp_remove_user_favorite( $user_id, $topic_id );
      		} elseif ( !$is_favorite && 'bbp_favorite_add' == $action ) {
      			$success = bbp_add_user_favorite( $user_id, $topic_id );
      		}
      
      		// Do additional favorites actions
      		do_action( 'bbp_favorites_handler', $success, $user_id, $topic_id, $action );
      
      		// Check for missing reply_id or error
      		if ( true == $success ) {
      
      			// Redirect back to new reply
      			if ( bbp_is_favorites() ) {
      				$redirect = bbp_get_favorites_permalink( $user_id );
      			} elseif ( bbp_is_single_user() ) {
      				$redirect = bbp_get_user_profile_url();
      			} elseif ( is_singular( bbp_get_topic_post_type() ) ) {
      

Comments are closed.