Merge branch 'production' into fix/9

# Conflicts:
#	themes/wporg-5ftf/single.php
This commit is contained in:
Kelly Dwan 2019-10-25 16:50:53 -04:00
commit 368d05e74d
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
23 changed files with 964 additions and 51 deletions

View file

@ -100,6 +100,11 @@ function populate_list_table_columns( $column, $post_id ) {
$contributor = get_post( $post_id );
$pledge = get_post( $contributor->post_parent );
if ( ! $pledge ) {
esc_html_e( 'Unattached', 'wordpressorg' );
break;
}
$pledge_name = get_the_title( $pledge );
if ( current_user_can( 'edit_post', $pledge->ID ) ) {
@ -134,6 +139,20 @@ function create_new_contributor( $wporg_username, $pledge_id ) {
return wp_insert_post( $args, true );
}
/**
* Remove a contributor post from a pledge.
*
* This wrapper function ensures we have a standardized way of removing a contributor that will still
* transition a post status (see PledgeMeta\update_confirmed_contributor_count).
*
* @param int $contributor_post_id
*
* @return false|WP_Post|null
*/
function remove_contributor( $contributor_post_id ) {
return wp_trash_post( $contributor_post_id );
}
/**
* Get the contributor posts associated with a particular pledge post.
*