0) {
$fa_comment_icon = 'fa-comment-o';
//$comment_icon = '' . $comment_number . '';
} else {
$fa_comment_icon = 'fa-comment';
//$comment_icon = null;
}
if ($this->has_attachments($note_id)) {
$fa_attachment_icon = 'fa-files-o';
} else {
$fa_attachment_icon = 'fa-file';
}
// if we have a logged-in user who is eligible for updates then give the full-function bar
if (user_can(wp_get_current_user(), 'transition_tasks')) {
// build the Font Awesome bar for regular users
$function_bar = '
' . ' ' .
'' . ' ' .
$this->use_multiaction($note_id, $status, $board) .
'' . ' ' .
'' . ' ' .
'
';
} else {
// build the Font Awesome bar for public
$function_bar = '
' .
'' . ' ' .
'
';
}
return $function_bar;
}
/**
* Show the mutlt-action icon.
*
* This method ...
*
* @param string $note_id The id of the current note
* @param string $status The current status being processed
* @param sting $board The current board being processed
* @return string The fa-plus icon and related action HTML/JS or a blank string
*
* @author Ken Kitchen ken@vinlandmedia.com
* @author Vinland Media, LLC.
* @package AgilePress
*/
private function use_multiaction($note_id = null, $status = null, $board = null)
{
//if ((in_array($status, array('sendtosprint')))) {
if (('sendtosprint' == $status) && ('sprint' == $board)) {
return ' ';
} else {
return "";
}
}
private function has_attachments($note_id) {
$agilepress_meta = get_post_meta($note_id, '_agilepress_attachment_data', false);
if ($agilepress_meta) {
return true;
} else {
return false;
}
}
}