Beispiel #1
0
        if (current_user_can('edit_post', get_the_id())) {
            ?>
			|  <a href="<?php 
            echo get_edit_post_link(get_the_id());
            ?>
" class="post-edit-link" rel="<?php 
            the_ID();
            ?>
">Edit</a>
			<?php 
        }
        ?>
			</span>
			<br />
			<?php 
        tags_with_count('', __('Tags: '), ', ', ' ');
        ?>
			</span>
			</h4>
			<div class="postcontent<?php 
        if (current_user_can('edit_post', get_the_id())) {
            ?>
 editarea<?php 
        }
        ?>
" id="content-<?php 
        the_ID();
        ?>
">
				<?php 
        the_content(__('(More ...)'));
    ?>
</a>
				<?php 
}
?>

				<?php 
do_action('p2_action_links');
?>
			</span>
			<?php 
if (is_object_in_taxonomy(get_post_type(), 'post_tag')) {
    ?>
				<span class="tags">
					<?php 
    tags_with_count('', __('<br />Tags:', 'articulacao') . ' ', ', ', ' &nbsp;');
    ?>
&nbsp;
				</span>
			<?php 
}
?>
		</span>
	</h4>

	<?php 
/*
 * Content
 */
?>
Beispiel #3
0
function prologue_latest_posts()
{
    $load_time = $_GET['load_time'];
    $frontpage = $_GET['frontpage'];
    $num_posts = 10;
    //max amount of posts to load
    $number_of_new_posts = 0;
    $prologue_query = new WP_Query('showposts=' . $num_posts . '&post_status=publish');
    ob_start();
    while ($prologue_query->have_posts()) {
        $prologue_query->the_post();
        $current_user_id = get_the_author_ID();
        if (get_gmt_from_date(get_the_time('Y-m-d H:i:s')) <= $load_time) {
            continue;
        }
        $number_of_new_posts++;
        if ($frontpage) {
            ?>
<li id="prologue-<?php 
            the_ID();
            ?>
" class="newupdates user_id_<?php 
            the_author_ID();
            ?>
">
    <?php 
            echo prologue_get_avatar($current_user_id, get_the_author_email(), 48);
            ?>
    <h4>
		<?php 
            the_author_posts_link();
            ?>
		<span class="meta">
		    <?php 
            printf(__('%s <em>on</em> %s', 'p2'), get_the_time(), get_the_time(get_option('date_format')));
            ?>
 |
			<?php 
            comments_popup_link('0', '1', '%');
            ?>
			
			<span class="actions">
				<a href="<?php 
            the_permalink();
            ?>
" class="thepermalink"><?php 
            _e('Permalink', 'p2');
            ?>
</a>
			<?php 
            if (function_exists('post_reply_link')) {
                echo post_reply_link(array('before' => ' | ', 'reply_text' => __('Reply', 'p2'), 'add_below' => 'prologue'), get_the_id());
            }
            ?>
			<?php 
            if (current_user_can('edit_post', get_the_id())) {
                ?>
			|  <a href="<?php 
                echo get_edit_post_link(get_the_id());
                ?>
" class="post-edit-link" rel="<?php 
                the_ID();
                ?>
"><?php 
                _e('Edit', 'p2');
                ?>
</a>
			<?php 
            }
            ?>
			</span>
			<br />
			<?php 
            tags_with_count('', __('Tags:', 'p2') . ' ', ', ', ' ');
            ?>
		</span>
	</h4>
	<div class="postcontent<?php 
            if (current_user_can('edit_post', get_the_id())) {
                ?>
 editarea<?php 
            }
            ?>
" id="content-<?php 
            the_ID();
            ?>
"><?php 
            the_content(__('(More ...)', 'p2'));
            ?>
</div> <!-- // postcontent -->
	<div class="bottom_of_entry">&nbsp;</div>
</li>
<?php 
        }
    }
    $posts_html = ob_get_contents();
    ob_end_clean();
    if ($number_of_new_posts == 0) {
        echo '0';
    } else {
        $json_data = array("numberofnewposts" => $number_of_new_posts, "html" => $posts_html, "lastposttime" => gmdate('Y-m-d H:i:s'));
        echo json_encode($json_data);
    }
    exit;
}
    ?>
</a>
				<?php 
}
?>

				<?php 
do_action('p2_action_links');
?>
			</span>
			<?php 
if (is_object_in_taxonomy(get_post_type(), 'post_tag')) {
    ?>
				<span class="tags">
					<?php 
    tags_with_count('', __('<br />Tags:', 'p2') . ' ', ', ', ' &nbsp;');
    ?>
&nbsp;
				</span>
			<?php 
}
?>
		</span>
	</h4>

	<?php 
/*
 * Content
 */
?>
Beispiel #5
0
    echo get_edit_post_link(get_the_id());
    ?>
" class="post-edit-link" rel="<?php 
    the_ID();
    ?>
"><?php 
    _e('Edit', 'p2');
    ?>
</a>
			        <?php 
}
?>
			    </span>
			    <br />
			    <?php 
tags_with_count('', __('Tags:', 'p2') . ' ', ', ', ' ');
?>
		    </span>
	    </h4>
	    <div class="postcontent<?php 
if (current_user_can('edit_post', get_the_id())) {
    ?>
 editarea<?php 
}
?>
" id="content-<?php 
the_ID();
?>
">
	        <?php 
the_content(__('(More ...)', 'p2'));