bbp_check_for_duplicate_query

  • apply_filters( 'bbp_check_for_duplicate_query', $dupe, $post_data )

    Source Reference:

    • Component: bbPress :: bbp-core
      File: /bbp-includes/bbp-common-functions.php :: Trac Source Line: 802
      		$join    = $where = '';
      	}
      
      	// Simple duplicate check
      	// Expected slashed ($post_type, $post_parent, $post_author, $post_content, $anonymous_data)
      	$status = bbp_get_trash_status_id();
      	$dupe   = "SELECT ID FROM {$wpdb->posts} {$join} WHERE post_type = '{$post_type}' AND post_status != '{$status}' AND post_author = {$post_author} AND post_content = '{$post_content}' {$where}";
      	$dupe  .= !empty( $post_parent ) ? " AND post_parent = '{$post_parent}'" : '';
      	$dupe  .= " LIMIT 1";
      	$dupe   = apply_filters( 'bbp_check_for_duplicate_query', $dupe, $post_data );
      
      	if ( $wpdb->get_var( $dupe ) ) {
      		do_action( 'bbp_check_for_duplicate_trigger', $post_data );
      		return false;
      	}
      
      	return true;
      }
      
      /**
      

Comments are closed.