mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-04 02:01:18 +03:00
Pledges: Move parse_contributors
function
This commit is contained in:
parent
a99b3b478e
commit
b898dc23f3
3 changed files with 58 additions and 58 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
namespace WordPressDotOrg\FiveForTheFuture\Endpoints;
|
||||
|
||||
use WordPressDotOrg\FiveForTheFuture\{ Auth, Contributor, Email, PledgeForm };
|
||||
use WordPressDotOrg\FiveForTheFuture\{ Auth, Contributor, Email };
|
||||
use const WordPressDotOrg\FiveForTheFuture\PledgeMeta\META_PREFIX;
|
||||
|
||||
add_action( 'wp_ajax_manage-contributors', __NAMESPACE__ . '\manage_contributors_handler' );
|
||||
|
@ -54,7 +54,7 @@ function manage_contributors_handler() {
|
|||
|
||||
case 'add-contributor':
|
||||
$pledge = get_post( $pledge_id );
|
||||
$new_contributors = PledgeForm\parse_contributors( $_POST['contributors'] );
|
||||
$new_contributors = Contributor\parse_contributors( $_POST['contributors'] );
|
||||
if ( is_wp_error( $new_contributors ) ) {
|
||||
wp_die( wp_json_encode( [
|
||||
'success' => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue