コード例 #1
0
ファイル: theme-loop.php プロジェクト: kosir/thatcamp-org
    /**
     * Displays the date. Must be used inside the loop.
    */
    function graphene_post_date($id = '')
    {
        if (!$id) {
            global $post;
            $id = $post->ID;
        }
        if (!graphene_should_show_date()) {
            return;
        }
        global $graphene_settings;
        $style = graphene_post_date_setting($id, 'post_date_display');
        if (stristr($style, 'icon')) {
            ?>
    	<div class="date updated alpha <?php 
            if ($style == 'icon_plus_year') {
                echo 'with-year';
            }
            ?>
">
        	<span class="value-title" title="<?php 
            the_time('Y-m-d\\TH:i');
            ?>
" />
            <p class="default_date">
            	<span class="month"><?php 
            the_time('M');
            ?>
</span>
                <span class="day"><?php 
            the_time('d');
            ?>
</span>
                <?php 
            if ($style == 'icon_plus_year') {
                ?>
	                <span class="year"><?php 
                the_time('Y');
                ?>
</span>
                <?php 
            }
            ?>
            </p>
            <?php 
            do_action('graphene_post_date');
            ?>
        </div>
    <?php 
        }
        if ($style == 'text') {
            ?>
    	<p class="post-date-inline updated">
        	<span class="value-title" title="<?php 
            the_time('Y-m-d\\TH:i');
            ?>
"></span>
            <abbr class="published" title="<?php 
            the_date('c');
            ?>
"><?php 
            the_time(get_option('date_format'));
            ?>
</abbr>
            <?php 
            do_action('graphene_post_date');
            ?>
        </p>
    <?php 
        }
    }
コード例 #2
0
ファイル: loop.php プロジェクト: kosir/thatcamp-org
        if ($post_type->name != 'page' && $graphene_settings['hide_post_author'] != true) {
            ?>
            <p class="post-author author vcard">
				<?php 
            /* translators: this is for the author byline, such as 'by John Doe' */
            $author_url = '<a href="' . get_author_posts_url(get_the_author_meta('ID')) . '" class="url" rel="author">' . get_the_author_meta('display_name') . '</a>';
            printf(__('by %s', 'graphene'), '<span class="fn nickname">' . apply_filters('graphene_author_url', $author_url) . '</span>');
            ?>
			</p>
			<?php 
        }
        ?>
								
			<?php 
        /* For printing: the date of the post */
        if ($graphene_settings['print_css'] && graphene_should_show_date()) {
            echo graphene_print_only_text(get_the_time(get_option('date_format')));
        }
        ?>
			
			<?php 
        do_action('graphene_post_meta');
        ?>
		</div>
		<?php 
    }
    ?>
		
		<?php 
    /* Post content */
    ?>