mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-05 10:25:45 +03:00
Manage Pledge: Enable pledge admins to edit contributors from manage form (#108)
* Add contributor management to manage form * Check `pledge_id` to prevent returning all contributors * Return a plain text error string – this is used in an alert box, so it can't contain HTML * Hide confirmation when pledge is a draft * Only enqueue script if the user is authorized
This commit is contained in:
parent
f5846c9128
commit
f30324adea
8 changed files with 110 additions and 18 deletions
|
@ -248,6 +248,9 @@ function get_pledge_contributors( $pledge_id, $status = 'publish', $contributor_
|
|||
* @return array An array of contributor data, ready to be used in the JS templates.
|
||||
*/
|
||||
function get_pledge_contributors_data( $pledge_id ) {
|
||||
if ( ! $pledge_id ) {
|
||||
return array();
|
||||
}
|
||||
$contrib_data = array();
|
||||
$contributors = get_pledge_contributors( $pledge_id, 'all' );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue