| 1 |
<?php |
| 2 |
/** |
| 3 |
* Admin Notifications template. |
| 4 |
* |
| 5 |
* @since 1.8.3 |
| 6 |
* @version 1.8.8.6 |
| 7 |
*/ |
| 8 |
|
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
|
| 13 |
$charitable_active_count = intval( $args['notifications']['active_count'] ); |
| 14 |
$charitable_dismissed_count = intval( $args['notifications']['dismissed_count'] ); |
| 15 |
$charitable_notifications_title = $charitable_active_count > 1 ? esc_html__( 'New Notifications', 'charitable' ) : esc_html__( 'New Notifications', 'charitable' ); |
| 16 |
|
| 17 |
?> |
| 18 |
|
| 19 |
<div class="charitable-plugin-notifications" id="charitable-plugin-notifications"> |
| 20 |
<div class="notification-menu"> |
| 21 |
<div class="notification-header"> |
| 22 |
<span class="new-notifications notifications-visible">(<span id="new-notifications-count"><strong><?php echo intval( $charitable_active_count ); ?></strong></span>) <?php echo esc_html( $charitable_notifications_title ); ?></span> |
| 23 |
<span class="old-notifications">(<span id="dismissed-notifications-count"><strong><?php echo intval( $charitable_dismissed_count ); ?></strong></span>) <?php esc_attr_e( 'Dismissed Notifications', 'charitable' ); ?></span> |
| 24 |
<div class="dismissed-notifications"> |
| 25 |
<!----> |
| 26 |
<a href="#" data-status="dismissed"><?php esc_attr_e( 'Dismissed Notifications', 'charitable' ); ?></a> |
| 27 |
<!----> |
| 28 |
</div> |
| 29 |
<div> |
| 30 |
<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="charitable-close"> |
| 31 |
<path d="M11.8211 1.3415L10.6451 0.166504L5.98305 4.82484L1.32097 0.166504L0.14502 1.3415L4.80711 5.99984L0.14502 10.6582L1.32097 11.8332L5.98305 7.17484L10.6451 11.8332L11.8211 10.6582L7.159 5.99984L11.8211 1.3415Z" fill="currentColor"></path> |
| 32 |
</svg> |
| 33 |
</div> |
| 34 |
</div> |
| 35 |
<div class="charitable-notification-cards notification-cards notification-cards-active notification-cards-visible"> |
| 36 |
<?php echo $args['notifications']['active_html']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 37 |
<!----> |
| 38 |
</div> |
| 39 |
<div class="charitable-notification-cards notification-cards notification-cards-dismissed"> |
| 40 |
<?php if ( empty( $args['notifications']['dismissed_html'] ) ) : ?> |
| 41 |
<div class="notification-card"> |
| 42 |
<div class="notification-card-content"> |
| 43 |
<span class="notification-no-dismissed-title"><?php esc_attr_e( 'No dismissed notifications.', 'charitable' ); ?></span> |
| 44 |
</div> |
| 45 |
</div> |
| 46 |
<?php else : ?> |
| 47 |
<?php echo $args['notifications']['dismissed_html']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 48 |
<?php endif; ?> |
| 49 |
</div> |
| 50 |
<div class="notification-footer"> |
| 51 |
<?php |
| 52 |
|
| 53 |
// Show the dismiss all button if there are active notifications. |
| 54 |
if ( $charitable_active_count > 0 ) : |
| 55 |
|
| 56 |
?> |
| 57 |
<div class="dismiss-all"><a href="#" class="dismiss"><?php esc_attr_e( 'Dismiss All', 'charitable' ); ?></a></div> |
| 58 |
<?php endif; ?> |
| 59 |
</div> |
| 60 |
</div> |
| 61 |
<div class="charitable-notifications-overlay"></div> |
| 62 |
</div> |
| 63 |
|