/** * Adds a new custom segment at the end of the breadcrumbs array * * @access public * @param string $title : the title of the segment * @param string $url : the url of the segment the segment is referring to * @param array $breadcrumbs : the breadcrumbs array. If set to NULL this method will just return one segment array without merging it to anything * @return array : the new breadcrumbs array with the custom segment at the end or just the segment array */ public function new_segment($title, $url, $breadcrumbs = array()) { if (!is_valid_string($title) && !is_valid_ci_url($url) && !is_valid_slug($url) && !is_valid_number($url) && !is_array($breadcrumbs) && !empty($breadcrumbs)) { if (!empty($breadcrumbs)) { return FALSE; } return $breadcrumbs; } if (!empty($breadcrumbs) && !is_valid_ci_url($url)) { $last = $breadcrumbs[count($breadcrumbs) - 1]['url']; $url = strip_trailing_slash($last) . '/' . $url; } $segment = array('title' => $title, 'url' => $url); $breadcrumbs[] = $segment; return $breadcrumbs; }
echo $comment->author_name; ?> </a> <?php } else { ?> <?php echo $comment->author_name; ?> <?php } ?> </p> <p><?php echo format_date($comment->created_at); ?> </p> <?php if ($comment->depth <= $max_comment_depth) { ?> <p><a href="<?php echo strip_trailing_slash(current_url()) . '/reply/' . $comment->id . '#comment-form'; ?> ">Reply</a></p> <?php } ?> </div> <!--END OF comment-meta--> </div> <!--END OF comment--> <?php }