mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-02 01:01:18 +03:00
Add a label for "deactivated" pledges
This commit is contained in:
parent
914b6d7292
commit
0ea187169e
|
@ -31,6 +31,15 @@ body.single.single-5ftf_pledge {
|
|||
margin-top: ms(2);
|
||||
}
|
||||
}
|
||||
|
||||
.pledge-status {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
font-size: ms(-1);
|
||||
text-transform: uppercase;
|
||||
background-color: $color-error-red;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.entry-title {
|
||||
|
|
|
@ -6,6 +6,7 @@ use WordPressDotOrg\FiveForTheFuture\XProfile;
|
|||
use WP_Post;
|
||||
|
||||
use const WordPressDotOrg\FiveForTheFuture\PledgeMeta\META_PREFIX;
|
||||
use const WordPressDotOrg\FiveForTheFuture\Pledge\DEACTIVE_STATUS;
|
||||
|
||||
$contribution_data = XProfile\get_aggregate_contributor_data_for_pledge( get_the_ID() );
|
||||
|
||||
|
@ -30,6 +31,9 @@ get_header();
|
|||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<div>
|
||||
<?php if ( DEACTIVE_STATUS === get_post_status() ) : ?>
|
||||
<span class="pledge-status"><?php esc_html_e( 'deactivated', 'wporg-5ftf' ); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
|
||||
<span class="pledge-url">
|
||||
<?php
|
||||
|
|
Loading…
Reference in a new issue