diff --git a/plugins/wporg-5ftf/includes/pledge-form.php b/plugins/wporg-5ftf/includes/pledge-form.php index f5d6815..fd819a1 100755 --- a/plugins/wporg-5ftf/includes/pledge-form.php +++ b/plugins/wporg-5ftf/includes/pledge-form.php @@ -81,7 +81,7 @@ function process_form_new() { ); } - $contributors = parse_contributors( $submission['pledge-contributors'] ); + $contributors = parse_contributors( $submission['org-pledge-contributors'] ); if ( is_wp_error( $contributors ) ) { return $contributors; @@ -184,7 +184,7 @@ function get_form_submission() { wp_list_pluck( PledgeMeta\get_pledge_meta_config( 'user_input' ), 'php_filter' ), // Inputs with no corresponding meta value. array( - 'pledge-contributors' => FILTER_SANITIZE_STRING, + 'org-pledge-contributors' => FILTER_SANITIZE_STRING, 'pledge-agreement' => FILTER_VALIDATE_BOOLEAN, ) ); @@ -246,7 +246,7 @@ function get_pledge_contributors( $pledge_id = 0 ) { $contributors = array(); // Get POST'd submission, if it exists. - $submission = filter_input( INPUT_POST, 'pledge-contributors', FILTER_SANITIZE_STRING ); + $submission = filter_input( INPUT_POST, 'org-pledge-contributors', FILTER_SANITIZE_STRING ); // Get existing pledge, if it exists. $pledge = get_post( $pledge_id ); diff --git a/plugins/wporg-5ftf/includes/pledge-meta.php b/plugins/wporg-5ftf/includes/pledge-meta.php index 5706c54..b197d44 100755 --- a/plugins/wporg-5ftf/includes/pledge-meta.php +++ b/plugins/wporg-5ftf/includes/pledge-meta.php @@ -60,6 +60,12 @@ function get_pledge_meta_config( $context = '' ) { 'show_in_rest' => false, 'php_filter' => FILTER_VALIDATE_INT, ), + 'org-pledge-contributors' => array( + 'single' => true, + 'sanitize_callback' => 'sanitize_text_field', + 'show_in_rest' => false, + 'php_filter' => FILTER_SANITIZE_STRING, + ), ); $generated = array( diff --git a/plugins/wporg-5ftf/views/inputs-pledge-contributors.php b/plugins/wporg-5ftf/views/inputs-pledge-contributors.php index 96a13e2..2aa5519 100644 --- a/plugins/wporg-5ftf/views/inputs-pledge-contributors.php +++ b/plugins/wporg-5ftf/views/inputs-pledge-contributors.php @@ -15,8 +15,8 @@ namespace WordPressDotOrg\FiveForTheFuture\View;