Exemple #1
0
 public function getAttachment()
 {
     global $wp_query;
     $title = string_len(trim(wp_title('', false)), 90);
     $pid = $wp_query->post->ID;
     $ppid = $wp_query->post->post_parent;
     $pathway = array();
     //  rss
     $pathway['first'] = array($title . ' comments feeds', array('href' => get_post_comments_feed_link($pid), 'type' => 'application/rss+xml', 'title' => __($title . ' | Subscribe to this comments feed', WPI_META), 'hreflang' => get_hreflang(), 'rel' => self::RSS_REL, 'class' => 'rtxt rss16', 'rev' => 'feed:rss2'));
     // home
     $pathway['home'] = $this->getFrontpage();
     // parent
     $att = array();
     $att['href'] = get_permalink($ppid);
     $att['title'] = 'Parent | ' . get_the_title($ppid);
     $att['class'] = 'parent-link dc-subject';
     $att['hreflang'] = get_hreflang();
     $pathway['parent'] = array(get_the_title($ppid), $att);
     //  attachments
     $att = array();
     $att['href'] = get_permalink($pid);
     $att['title'] = __('Attachment | permalink', WPI_META);
     $pathway['attachment'] = array('Attachment', $att);
     //  attachments-pid
     $att = array();
     $att['href'] = get_permalink() . '#content-top';
     $att['title'] = $title . ' | Skip to content';
     $att['hreflang'] = get_hreflang();
     $att['class'] = 'last-items ' . self::DN_ARROW;
     if (($pageno = wpi_get_post_current_paged()) != false) {
         $pathway['post'] = array($title, $att);
         $title = 'on page ' . $pageno;
         $att = array();
         $att['href'] = wpi_paged_url($pageno);
         $att['title'] = $title;
         $att['rev'] = 'site:relative';
     }
     $pathway['last'] = array($title, $att);
     return $pathway;
 }
Exemple #2
0
/**
 * Post template for page
 */
function wpi_template_page()
{
    global $post;
    ?>
	<ul class="hfeed r cf">
	<?php 
    while (have_posts()) {
        the_post();
        ?>
	<li class="xfolkentry hentry hreview hlisting cf">		
		<dl class="r">
			<dd class="postmeta-head span-13 fl">
				<?php 
        wpi_hatom_title();
        ?>
			<div class="postmeta-info">			
			<span class="pby dn vcard"><?php 
        printf(__('Posted by <acronym class="reviewer author" title="%1$s">%2$s</acronym>', WPI_META), get_the_author_nickname(), wpi_get_post_author());
        ?>
</span>
			 <span class="ptime r"><?php 
        printf(__(' <cite>%s</cite>', WPI_META), wpi_get_postime());
        ?>
.</span>	
			</div>	
			</dd>
			<dd class="cb entry-content description entry ox">
			<?php 
        do_action('wpi_before_content_' . is_at(), $post);
        ?>
			<?php 
        if (wpi_get_theme_option('post_excerpt') && has_excerpt($post->ID)) {
            ?>
				<blockquote cite="<?php 
            the_permalink();
            ?>
#excerpt" class="has-excerpt entry-summary summary span-4 fr">
					<?php 
            the_excerpt();
            ?>
				</blockquote>			
			<?php 
        }
        ?>
					<?php 
        if (($pageno = wpi_get_post_current_paged()) != false) {
            ?>
					<div class="postmeta-page span-1 fl">				
						<small>Page</small>		
						<big title="<?php 
            _e('Page ' . $pageno, WPI_META);
            ?>
"><?php 
            echo $pageno;
            ?>
</big>
					</div>
					<?php 
        }
        ?>
				<div id="iscontent" class="mgb">					
				<?php 
        the_content('Read the rest of this entry &raquo;');
        ?>
				</div>

			</dd>
			<?php 
        wp_link_pages(array('before' => '<dd class="postmeta-pages"><strong>' . __('Pages', WPI_META) . '</strong> ', 'after' => '</dd>', 'next_or_number' => 'number'));
        ?>
			<?php 
        the_tags('<dd class="postmeta-tags"><acronym  class="rtxt fl" title="Tags &#187; Taxonomy">Tags:</acronym> <ul class="tags r cfl cf"><li>', '<span class="sep">,</span>&nbsp;</li><li>', '</li></ul></dd>');
        ?>
			<?php 
        $rating_class = wpi_get_theme_option('post_hrating') ? 'rating-count' : 'rating-count dn';
        ?>
			<dd class="postmeta-comments cf">
			<ul class="xoxo cfl r cf">
			<li class="<?php 
        echo $rating_class;
        ?>
"><?php 
        wpi_hrating();
        ?>
&nbsp;</li>
			<?php 
        if (wpi_get_theme_option('post_bookmarks')) {
            ?>
			<li class="postmeta-response"><?php 
            wpi_bookmarks();
            ?>
			
			<?php 
        }
        ?>
			</li>
			
			</ul>
			<?php 
        edit_post_link(__('Edit this entry.', WPI_META), '<p class="cb edit-links">', '</p>');
        ?>
			</dd>
			
			<dd class="dn">
				<ul class="more">
					<li class="node-1">				
						<abbr class="dtstart published dtreviewed dc-date" title="<?php 
        the_time('Y-m-dTH:i:s:Z');
        ?>
"><?php 
        the_time('F j, Y');
        ?>
 at <?php 
        the_time('g:i a');
        ?>
</abbr>	
					</li>
					<li class="node-2">
						<abbr class="dtend updated dtexpired" title="<?php 
        the_modified_date('Y-m-dTH:i:s:Z');
        ?>
"><?php 
        the_modified_date('F j, Y');
        ?>
 at <?php 
        the_modified_date('g:i a');
        ?>
</abbr>
					</li>
					<li class="version">0.3</li>
					<li class="type">url</li>					
				</ul>
			</dd>			
		</dl>
<!--
<?php 
        trackback_rdf();
        ?>
-->			
	</li>	
	<?php 
    }
    ?>
	</ul>
<?php 
}