mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-01 16:51:18 +03:00
Check pledge_id
to prevent returning all contributors
This commit is contained in:
parent
b1b2ba9732
commit
3515a6eef1
|
@ -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…
Reference in a new issue