function edd_fes_pu_has_pending_emails($author_id = 0) { if (empty($author_id)) { $author_id = get_current_user_id(); } return (bool) edd_fes_pu_pending_emails_count($author_id); }
<form id="edd-fes-product-updates" method="POST"> <p><?php _e('Use this page to send an email to customers of one or more of your products.', 'edd-fes-product-updates'); ?> </p> <?php if (edd_fes_pu_products()) { ?> <?php if (edd_fes_pu_has_pending_emails()) { ?> <p class="edd-fes-product-updates-pending"><?php printf(__('You have %d pending emails awaiting review by site administrators.', 'edd-fes-product-updates'), edd_fes_pu_pending_emails_count()); ?> </p> <?php } ?> <fieldset> <p> <?php _e('Select the product(s) to include customers of for this email.', 'edd-fes-product-updates'); ?> <br/> <?php foreach (edd_fes_pu_products() as $product) { ?> <label for="fes-email-product-<?php