Example #1
0
}
?>

<div id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
	<div class="hr"></div>
	<?php 
if ($twitter_id = get_post_meta(get_the_ID(), 'twitter_id', true)) {
    ?>
		<blockquote<?php 
    if (Homeroom::get_option('enable_twitter_embeds')) {
        ?>
 class="twitter-tweet"<?php 
    }
    ?>
>
			<?php 
    the_content();
    if (!($permalink = get_post_meta(get_the_ID(), 'twitter_permalink', true))) {
        if ($twitterer = get_user_meta($post->post_author, 'twitter')) {
            $permalink = "https://twitter.com/" . esc_attr($twitterer) . "/statuses/{$twitter_id}";
        } else {
            $permalink = get_permalink();
        }
    }
    ?>
Example #2
0
<?php

/**
 * The template for displaying Search Results pages.
 *
 * @package Homeroom
 * @since Homeroom 1.0
 */
if ('masonry' == Homeroom::get_option('search_results_view')) {
    add_action('wp_enqueue_scripts', function () {
        wp_enqueue_script('jquery-masonry');
    });
}
get_header();
?>

		<section id="primary" class="site-content">
			<div id="content" role="main">

			<?php 
if (have_posts()) {
    ?>

				<header class="page-header">
					<h1 class="page-title">
						<?php 
    _e('Search for: ', 'homeroom');
    get_template_part('searchform');
    ?>
					</h1>
				</header><!-- .page-header -->
Example #3
0
<?php 
$this_post_format = get_post_format();
do_action('before_post');
?>
<article class="f-<?php 
echo esc_attr($this_post_format);
?>
">
	<?php 
get_template_part('once', $this_post_format);
// Anything that happens once per grouping of posts
get_template_part('snippet', $this_post_format);
// On the homepage, we do some lookahead magic and collapse posts a bit
// Don't collapse images, they deserve full display, always
// Break for each new day also
if (Homeroom::get_option('collapse_consecutive_posts') && is_home() && 'image' != $this_post_format && '' != $this_post_format) {
    $temp_post = $post;
    $first = true;
    while (true) {
        $next = homeroom_next_post();
        // Different post format, or nothing else to output?
        if (!$next || $this_post_format != get_post_format($next)) {
            break;
        }
        // Different day? @todo, - decide on time/hour to split?
        if (get_the_date('Y-m-d') != substr($next->post_date, 0, strpos($next->post_date, ' '))) {
            break;
        }
        // Looks good -- set up the post and then output this snippet
        $post = $next;
        setup_postdata($post);
Example #4
0
 function multimap_posts_between($where = '')
 {
     global $wpdb;
     // The dates are actually "reversed" because blogs go back in time
     $where .= $wpdb->prepare(" AND ( `post_date` BETWEEN %s AND %s ) AND `post_date` < %s - INTERVAL %d HOUR", $this->multimap_end, $this->multimap_start, current_time('mysql'), Homeroom::get_option('hide_checkins_for_hours'));
     $this->multimap_start = $this->multimap_end;
     return $where;
 }
Example #5
0
<?php

if (!Homeroom::get_option('enable_frontend_postbox') || !is_home() || !is_user_logged_in() || !current_user_can('publish_posts') || get_query_var('paged')) {
    return;
}
require_once get_template_directory() . '/inc/admin.php';
?>
<div id="open-editor"></div>

<article id="editor">
	<?php 
$gravatar = get_avatar(get_current_user_id(), 40);
$gravatar = str_replace("class='", "class='format-icon ", $gravatar);
echo $gravatar;
?>
	<ul>
		<li class="editor-title">
			<input type="text" name="editor-title" id="editor-title" value="" placeholder="<?php 
esc_html_e('Enter title here', 'homeroom');
?>
" />
		</li>
		<li class="editor-content">
			<textarea name="editor-content" id="editor-content" placeholder="<?php 
esc_html_e('Write your post here...', 'homeroom');
?>
"></textarea>
		</li>
		<li class="editor-buttons">
			<input type="text" name="editor-tags" id="editor-tags" value="" placeholder="<?php 
esc_html_e('comma, separated, tags', 'homeroom');