mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-05 10:25:45 +03:00
Log: Record when contributors are added to a pledge
This also updates the function that creates new contributor posts. It replaces `create_new_contributor` with `add_pledge_contributors`. This way we can capture a batch of contributor additions all in one event by collecting all the `wp_insert_post` results in an array and including it as an action parameter.
This commit is contained in:
parent
a41ecd7665
commit
461278f525
3 changed files with 55 additions and 15 deletions
|
@ -90,9 +90,7 @@ function process_form_new() {
|
|||
return $new_pledge_id;
|
||||
}
|
||||
|
||||
foreach ( $contributors as $wporg_username ) {
|
||||
Contributor\create_new_contributor( $wporg_username, $new_pledge_id );
|
||||
}
|
||||
Contributor\add_pledge_contributors( $new_pledge_id, $contributors );
|
||||
|
||||
// Attach logo to the pledge.
|
||||
wp_update_post( array(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue