/** * Render the status column * * @access public * @since 1.0 * @param array $referral Contains all the data for the checkbox column * @return string Displays the referral status */ public function column_status($referral) { return '<span class="affwp-status ' . $referral->status . '"><i></i>' . affwp_get_referral_status_label($referral) . '</span>'; }
function test_get_referral_status_label() { $this->assertEquals('Pending', affwp_get_referral_status_label($this->_referral_id)); }
foreach ($referrals as $referral) { ?> <tr> <td class="referral-amount"><?php echo affwp_currency_filter(affwp_format_amount($referral->amount)); ?> </td> <td class="referral-description"><?php echo wp_kses_post(nl2br($referral->description)); ?> </td> <td class="referral-status <?php echo $referral->status; ?> "><?php echo affwp_get_referral_status_label($referral); ?> </td> <td class="referral-date"><?php echo date_i18n(get_option('date_format'), strtotime($referral->date)); ?> </td> <?php do_action('affwp_referrals_dashboard_td', $referral); ?> </tr> <?php } ?> <?php
/** * Render the status column * * @access public * @since 1.0 * @param array $referral Contains all the data for the checkbox column * @return string Displays the referral status */ public function column_status($referral) { $value = '<span class="affwp-status ' . $referral->status . '"><i></i>' . affwp_get_referral_status_label($referral) . '</span>'; return apply_filters('affwp_referral_table_status', $value, $referral); }