mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-04 10:05:43 +03:00
My Pledges: Update styles and format to match design
- Add a single-pledge view so we can separate out the pending from published - Update layout and styles of my pledges list - Adds link and danger button styles
This commit is contained in:
parent
2b7fb6cd21
commit
0b26fad482
7 changed files with 310 additions and 123 deletions
|
@ -253,20 +253,21 @@ function render_my_pledges() {
|
|||
$pledge_url = get_permalink( get_page_by_path( 'for-organizations' ) );
|
||||
$success_message = process_my_pledges_form();
|
||||
|
||||
$contributor_posts = get_posts( array(
|
||||
$contributor_pending_posts = get_posts( array(
|
||||
'title' => $user->user_login,
|
||||
'post_type' => CPT_ID,
|
||||
'post_status' => array( 'pending', 'publish' ),
|
||||
'post_status' => array( 'pending' ),
|
||||
'numberposts' => 100,
|
||||
) );
|
||||
|
||||
$confirmed_pledge_ids = array_reduce( $contributor_posts, function( $carry, $post ) {
|
||||
if ( 'publish' === $post->post_status ) {
|
||||
$carry[] = $post->ID;
|
||||
}
|
||||
$contributor_publish_posts = get_posts( array(
|
||||
'title' => $user->user_login,
|
||||
'post_type' => CPT_ID,
|
||||
'post_status' => array( 'publish' ),
|
||||
'numberposts' => 100,
|
||||
) );
|
||||
|
||||
return $carry;
|
||||
}, array() );
|
||||
$confirmed_pledge_ids = wp_list_pluck( $contributor_publish_posts, 'ID' );
|
||||
|
||||
ob_start();
|
||||
require FiveForTheFuture\get_views_path() . 'list-my-pledges.php';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue