コード例 #1
0
" title="<?php 
    the_title_attribute();
    ?>
">
					<?php 
    if (ctc_has_title()) {
        ?>
						<?php 
        the_title();
        ?>
					<?php 
    } else {
        // no title for Status post format, for example
        ?>
						<?php 
        echo ctc_shorten(strip_tags(get_the_excerpt()), 38);
        // use first part of content as title
        ?>
					<?php 
    }
    ?>
				</a>
			</h1>

			<ul class="ctc-widget-entry-meta ctc-clearfix">

				<?php 
    if ($instance['show_date']) {
        ?>
					<li class="ctc-widget-entry-date">
						<time datetime="<?php 
コード例 #2
0
 /**
  * Tidy title
  *
  * Tidy the post/page title by shortening and removing Protected: / Private:
  *
  * To Do: Improve this so consider all languages and actual post status.
  *
  * @since 1.3
  * @access public
  * @param string $title Post/page title
  * @param array $options Options affecting tidying
  * @return string Tidied title
  */
 public function tidy_title($title, $options = array())
 {
     $tidy_title = $title;
     // Remove "Protected: " and "Private: "
     $tidy_title = preg_replace('/^(Protected|Private): (.+)$/', '$2', $tidy_title);
     // Shorten
     if (isset($options['shorten'])) {
         $tidy_title = ctc_shorten($tidy_title, $options['shorten']);
     }
     return apply_filters('ctc_post_breadcrumbs', $tidy_title, $title);
 }