echo $thumb_url; ?> " alt="<?php echo esc_attr($file['name']); ?> " /></a> </div> <div class="cpm-thumb-detail"> <h3 class="cpm-file-name"><?php echo $file['name']; ?> </h3> <div class="cpm-file-meta"> <?php printf(__('Attached to <a href="%s">%s</a> by %s', 'cpm'), $topic_url, strtolower($post_type_object->labels->singular_name), cpm_url_user($attachment->post_author)); ?> </div> <div class="cpm-file-action"> <?php printf(__('<a href="%s">Download</a> or go to the <a href="%s">discussion</a>.', 'cpm'), $file_url, $topic_url); ?> <?php if ($parent->comment_count) { ?> <span class="comment-number"> <?php printf(_n('%d comment', '%d comments', get_comments_number($parent->ID), 'cpm'), get_comments_number($parent->ID)); ?> </span>
function cpm_assigned_user($users) { if (is_array($users)) { foreach ($users as $user_id) { echo '<span class="cpm-assigned-user">'; echo cpm_url_user($user_id); echo '</span>'; } } else { echo '<span class="cpm-assigned-user">'; echo cpm_url_user($users); echo '</span>'; } }
/** * Displays a users profile url * * @since 0.1 * @param array $atts * @return string */ function cpm_sc_user_url($atts) { $atts = extract(shortcode_atts(array('id' => 0), $atts)); return cpm_url_user($id); }
/** * Generates markup for displaying a single comment * * @since 0.1 * @param object $comment * @param int $project_id * @param string $class * @return string */ function cpm_show_comment($comment, $project_id, $class = '') { $class = empty($class) ? '' : ' ' . $class; ob_start(); ?> <li class="cpm-comment<?php echo $class; ?> " id="cpm-comment-<?php echo $comment->comment_ID; ?> "> <div class="cpm-avatar"><?php echo cpm_url_user($comment->user_id, true); ?> </div> <div class="cpm-comment-container"> <div class="cpm-comment-meta"> <span class="cpm-author"><?php echo cpm_url_user($comment->user_id); ?> </span> <span class="cpm-separator">|</span> <span class="cpm-date"><?php echo cpm_get_date($comment->comment_date, true); ?> </span> <?php if ($comment->user_id == get_current_user_id() && $comment->comment_type == '') { ?> <span class="cpm-separator">|</span> <span class="cpm-edit-link"> <a href="#" class="cpm-edit-comment-link" <?php cpm_data_attr(array('comment_id' => $comment->comment_ID, 'project_id' => $project_id, 'object_id' => $comment->comment_post_ID)); ?> > <span><?php _e('Edit', 'cpm'); ?> </span> </a> </span> <span class="cpm-separator">|</span> <span class="cpm-delete-link"> <a href="#" class="cpm-delete-comment-link" <?php cpm_data_attr(array('project_id' => $project_id, 'id' => $comment->comment_ID, 'confirm' => 'Are you sure to delete this comment?')); ?> > <span><?php _e('Delete', 'cpm'); ?> </span> </a> </span> <?php } ?> </div> <div class="cpm-comment-content"> <?php echo comment_text($comment->comment_ID); ?> <?php echo cpm_show_attachments($comment, $project_id); ?> </div> <div class="cpm-comment-edit-form"></div> </div> </li> <?php return ob_get_clean(); }
</h3> <?php echo cpm_message_form($project_id); ?> </div> <table class="cpm-messages-table"> <?php $messages = $msg_obj->get_all($project_id); foreach ($messages as $message) { ?> <tr> <td class="author"> <span class="cpm-avatar"><?php echo cpm_url_user($message->post_author, true, 32); ?> </span> </td> <td class="message"> <a href="<?php echo cpm_url_single_message($project_id, $message->ID); ?> "> <span class="title"><?php echo cpm_excerpt($message->post_title, 50); ?> </span> <?php if ($message->post_content) { printf('<span class="excerpt"> - %s</span>', cpm_excerpt($message->post_content, 100));
<div class="cpm-single"> <h3 class="cpm-entry-title"><?php echo get_the_title($message_id); ?> </h3> <div class="cpm-entry-meta"> <span class="cpm-date"><?php echo cpm_get_date($message->post_date); ?> </span> <span class="cpm-separator">|</span> <span class="cpm-date"><?php echo cpm_url_user($message->post_author); ?> </span> <span class="cpm-separator">|</span> <span class="cpm-comment-num"><?php echo cpm_get_number($message->comment_count); ?> </span> <span class="cpm-separator">|</span> <span class="cpm-edit-link"> <a href="#" data-msg_id="<?php echo $message->ID; ?> " data-project_id="<?php echo $project_id; ?>