Example #1
0
function wpi_post_author_name()
{
    $author_url = wpi_get_author_name();
    $literal_label = __('Post by', WPI_META);
    $attribs = array('class' => 'literal-label');
    $post_by = _t('span', $literal_label, array('class' => 'literal-label'));
    if (wpi_get_theme_option('post_by_enable')) {
        $output = $post_by . ' ' . $author_url;
    } else {
        $output = $post_by . ' ' . $author_url;
        $output = _t('dfn', $output, array('class' => 'dn'));
    }
    echo $output;
}
Example #2
0
function wpi_template_attachment()
{
    global $post;
    $pby_class = wpi_get_theme_option('post_by_enable') ? 'pby' : 'pby dn';
    ?>
	<ul class="hfeed r cf">
	<?php 
    while (have_posts()) {
        the_post();
        ?>
	<li class="xfolkentry hentry hreview hlisting cf">		
		<dl class="r">
			<dd class="postmeta-date fl">
				<ul class="span-1 pdate r">
					<li class="pmonth"><span><?php 
        the_time('M');
        ?>
</span></li>
					<li class="pday"><span><?php 
        the_time('d');
        ?>
</span></li>
					<li class="pyear"><span><?php 
        the_time('Y');
        ?>
</span></li>
				</ul>
			</dd>
			<dd class="postmeta-head span-13 start fl">
				<?php 
        wpi_hatom_title();
        ?>
				<div class="postmeta-info">				
				<span class="<?php 
        echo $pby_class;
        ?>
">Posted by <cite class="vcard reviewer author"><?php 
        wpi_post_author();
        ?>
</cite>.</span> <p class="di"><?php 
        _e('Filed under', WPI_META);
        wpi_cat_links(1);
        ?>
.</p>
					<p><span class="ptime r"><?php 
        printf(__(' <cite>%s</cite>', WPI_META), wpi_get_postime());
        ?>
</span></p><?php 
        wpi_text_size();
        ?>
 
				</div>	
			</dd>
			<dd class="entry-content description entry cb ox">
			<?php 
        do_action('wpi_before_content_attachment');
        ?>
<div class="entry-attachment pdt"><a href="<?php 
        echo wp_get_attachment_url($post->ID);
        ?>
" title="<?php 
        echo wp_specialchars(get_the_title($post->ID), 1);
        ?>
" class="thickbox thumb-" rel="attachment"><?php 
        echo wp_get_attachment_image($post->ID, 'large');
        ?>
</a></div>
					<div class="entry-caption mgt"><?php 
        if (!empty($post->post_excerpt)) {
            the_excerpt();
        }
        ?>
</div>			
					<?php 
        if (wpi_option('post_author_description')) {
            ?>
					<fieldset id="post-author" class="cb cf pdt mgt">
						<?php 
            $ll = __('About the Author', WPI_META);
            ?>
						<?php 
            t('legend', $ll, array('title' => $ll));
            ?>
						
					<address class="author-avatar <?php 
            wpiGravatar::authorGID();
            ?>
 rn fl">
					<span class="rtxt">&nbsp;</span>
					</address>	
					<p id="about-author" class="postmetadata fl">
						<small class="db rn"><?php 
            the_author_description();
            ?>
&nbsp;</small>
					</p>
					</fieldset>
				<?php 
        }
        ?>
			</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 
}
Example #3
0
 public static function getOption($options)
 {
     return wpi_get_theme_option($options);
 }
Example #4
0
function wpi_option($name)
{
    return wpi_get_theme_option($name);
}
Example #5
0
 public static function option($name)
 {
     return wpi_get_theme_option($name);
 }
Example #6
0
function wpi_get_pages_link()
{
    $options = 'sort_column=menu_order&title_li=&echo=';
    $exclude = wpi_get_theme_option('menu_page_exclude');
    if ($exclude && !empty($exclude)) {
        $options .= '&exclude=' . $exclude;
    }
    $output = wp_list_pages($options);
    $output = preg_replace('%<a ([^>]+)>%U', '<a $1><span>', $output);
    $output = str_replace('</a>', '</span></a>', $output);
    return $output;
}
Example #7
0
 public function meta()
 {
     global $wp_query;
     $m = array();
     $section = is_at();
     $m[] = array('name' => 'distribution', 'content' => 'global');
     $m[] = array('name' => 'rating', 'content' => 'general');
     $m[] = array('name' => 'designer', 'content' => 'Avice De&apos;v&eacute;reux; url:http://blog.kaizeku.com');
     if ($wp_query->is_singular) {
         $aid = (int) $wp_query->post->post_author;
         $user = get_userdata($aid);
         $name = ent2ncr(htmlentities2($user->display_name));
         unset($aid, $user);
         $m[] = array('name' => 'author', 'content' => $name);
     }
     if (get_option('blog_public') != '0') {
         $robots = sprintf('%s, follow', (is_home() || is_single() || is_page()) && !is_paged() ? 'index' : 'noindex');
         $m[] = array('name' => 'robots', 'content' => $robots . ', noodp');
     }
     $m[] = array('name' => 'DC.type', 'content' => 'text', 'scheme' => 'DCTERMS.DCMIType');
     $m[] = array('name' => 'DC.format', 'content' => self::getContentMIMEType(), 'scheme' => 'DCTERMS.IMT');
     $m[] = array('name' => 'DC.language', 'content' => self::getContentLanguage(), 'scheme' => 'DCTERMS.RFC3066');
     $m[] = array('name' => 'DC.identifier', 'content' => self_uri(), 'scheme' => 'DCTERMS.URI');
     $m[] = array('name' => 'DC.title', 'content' => wp_title('&#187;', false, 'right') . WPI_BLOG_NAME);
     if ($section == 'home') {
         if (wpi_option('meta_description')) {
             $prop = wpi_safe_stripslash(wpi_option('def_meta_description'));
             if ('' == $prop) {
                 $prop = attribute_escape(get_option('blogdescription'));
             }
             $m[] = array('name' => 'description', 'content' => $prop);
         }
         // keywords
         if (wpi_option('meta_keywords')) {
             $prop = wpi_safe_stripslash(wpi_option('def_meta_keywords'));
             if ('' == $prop) {
                 $prop = WPI_BLOG_NAME;
             }
             $m[] = array('name' => 'keywords', 'content' => $prop);
         }
     }
     $is_desc = wpi_option('meta_description');
     $is_keyswords = wpi_option('meta_keywords');
     if ($section == 'single' || $section == 'page') {
         global $post;
         if (($subtitle = wpi_get_postmeta('subtitle')) != false) {
             $m[] = array('name' => 'abstract', 'content' => attribute_escape($subtitle));
         }
         if ($is_desc) {
             if (($desc = wpi_get_postmeta('meta_description')) != false) {
                 $m[] = array('name' => 'description', 'content' => attribute_escape($desc));
             }
         }
         if ($is_keyswords) {
             if (($keywords = wpi_get_postmeta('meta_keywords')) != false) {
                 $m[] = array('name' => 'keywords', 'content' => attribute_escape($keywords));
             }
         }
     }
     if ($section == 'category' || $section == 'tag') {
         if ($is_desc) {
             global $cat;
             $cat = get_category($cat);
             if (($desc = $cat->category_description) != '') {
                 $m[] = array('name' => 'description', 'content' => attribute_escape($desc));
             } else {
                 $desc = WPI_BLOG_NAME . '&apos;s archive for ' . $cat->name . ', there is ' . $cat->count . ' articles in this category';
                 $m[] = array('name' => 'description', 'content' => attribute_escape($desc));
             }
         }
     }
     $geourl = wpi_get_theme_option('geourl');
     if ($geourl && !empty($geourl)) {
         $geo_position = explode(",", $geourl);
         $m[] = array('name' => 'geo.position', 'content' => $geo_position[0] . ';' . $geo_position[1]);
         $m[] = array('name' => 'ICBM', 'content' => $geourl);
     }
     $microid = wpi_get_theme_option('microid_hash');
     if ($microid && !empty($microid)) {
         $m[] = array('name' => 'microid', 'content' => $microid);
     }
     if (has_count($m)) {
         foreach ($m as $attribs) {
             echo "\t" . _t('meta', '', $attribs);
         }
     }
     unset($m, $attribs);
 }