Exemple #1
0
 * CONTENT
 */
?>

	<div id="content-<?php 
the_ID();
?>
" class="postcontent">
		<?php 
if ('status' == p2_get_the_category() || 'link' == p2_get_the_category()) {
    the_content(__('(More ...)', 'p2'));
} elseif ('quote' == p2_get_the_category()) {
    echo "<blockquote>";
    p2_quote_content();
    echo "</blockquote>";
} elseif ('post' == p2_get_the_category()) {
    p2_title();
    the_content(__('(More ...)', 'p2'));
} else {
    p2_title();
    the_content(__('(More ...)', 'p2'));
}
?>
	</div>

	<?php 
/**
 * COMMENTS
 */
$comment_field = '<div class="form"><textarea id="comment" class="expand50-100" name="comment" cols="45" rows="3"></textarea></div> <label class="post-error" for="comment" id="commenttext_error"></label>';
$comment_notes_before = '<p class="comment-notes">' . (get_option('require_name_email') ? sprintf(' ' . __('Required fields are marked %s'), '<span class="required">*</span>') : '') . '</p>';
Exemple #2
0
function p2_the_category()
{
    echo p2_get_the_category();
}
/**
 * Get post format for current post object.
 *
 * The value should be a valid post format or one of the back compat categories.
 *
 * @since P2 1.3.4
 * @uses p2_get_the_category for back compat category check
 * @uses p2_get_supported_post_formats for accepted values
 *
 * @param object post_id Uses global post if in the loop; required for use outside the loop
 * @return string
 */
function p2_get_post_format($post_id = null)
{
    if (is_null($post_id)) {
        global $post;
        $post_id = $post->ID;
    }
    if (empty($post_id)) {
        return '';
    }
    // 1- try to get post format, first
    $post_format = get_post_format($post_id);
    // 2- try back compat category, next
    if (false === $post_format) {
        $post_format = p2_get_the_category($post_id);
    }
    // Check against accepted values
    if (empty($post_format) || !in_array($post_format, p2_get_supported_post_formats())) {
        $post_format = 'standard';
    }
    return $post_format;
}
Exemple #4
0
										<p class="date"><?php the_time('F j, Y') ?> <em><?php _e( 'in', 'buddypress' ) ?> <?php the_category(', ') ?> <?php printf( __( 'by %s', 'buddypress' ), bp_core_get_userlink($post->post_author) ) ?></em></p>
													
									<?php endif; ?>
									
								</div>
								
								<div class="entry postcontent<?php if ( current_user_can( 'edit_post', get_the_id() ) ) : ?> editarea<?php endif ?>" id="content-<?php the_ID(); ?>">
								<?php if ( 'post' == p2_get_the_category() || 'link' == p2_get_the_category() ) : ?>
								<?php the_content( __( '(More ...)' , 'p2' ) ); ?>
								<?php elseif ( 'quote' == p2_get_the_category() ) : ?>

									<blockquote>
										<?php p2_quote_content(); ?>
									</blockquote>

								<?php elseif ( 'post' == p2_get_the_category() ) : ?>

								
								<?php the_content( __( '(More ...)' , 'p2' ) ); ?>

								<?php else : ?>

								
								<?php the_content( __( '(More ...)' , 'p2' ) ); ?>

								<?php endif; ?>
								<?php if ( !is_page() ) : ?>
									<span class="tags">
										<?php the_tags( __( 'Tags: ', 'buddypress' )); ?>
									<?php endif; ?>
								</div>  <!-- End of post entry-->