Example #1
0
function content_id()
{
    if (post_id()) {
        return post_id();
    } elseif (page_id()) {
        return page_id();
    }
}
Example #2
0
function content_id()
{
    if (post_id()) {
        return post_id();
    } elseif (product_id()) {
        return product_id();
    } elseif (page_id()) {
        return page_id();
    } elseif (defined('CONTENT_ID')) {
        return CONTENT_ID;
    }
}
Example #3
0
<div style="clear:both;"></div>
</div>
<?php 
do_action('under_title');
if ($posts) {
    topic_pages(array('before' => '<div class="nav">', 'after' => '</div>'));
    ?>
<div id="ajax-response"></div>
<ol id="thread" class="list:post">

<?php 
    foreach ($posts as $bb_post) {
        $del_class = apply_filters('best_answer_class', post_del_class());
        ?>
	<li id="post-<?php 
        post_id();
        ?>
"<?php 
        alt_class('post', $del_class);
        ?>
>
<?php 
        bb_post_template();
        ?>
	</li>
<?php 
    }
    ?>

</ol>
<div class="clearit"><br style=" clear: both;" /></div>
function bb_admin_list_posts()
{
    global $bb_posts, $bb_post;
    if (!$bb_posts) {
        ?>
<p class="no-results"><?php 
        _e('No posts found.');
        ?>
</p>
<?php 
    } else {
        ?>
<table id="posts-list" class="widefat" cellspacing="0" cellpadding="0">
<thead>
	<tr>
		<th scope="col" class="check-column"><input type="checkbox" /></th>
		<th scope="col"><?php 
        _e('Post');
        ?>
</th>
		<th scope="col"><?php 
        _e('Author');
        ?>
</th>
		<th scope="col"><?php 
        _e('Topic');
        ?>
</th>
		<th scope="col"><?php 
        _e('Date');
        ?>
</th>
	</tr>
</thead>
<tfoot>
	<tr>
		<th scope="col" class="check-column"><input type="checkbox" /></th>
		<th scope="col"><?php 
        _e('Post');
        ?>
</th>
		<th scope="col"><?php 
        _e('Author');
        ?>
</th>
		<th scope="col"><?php 
        _e('Topic');
        ?>
</th>
		<th scope="col"><?php 
        _e('Date');
        ?>
</th>
	</tr>
</tfoot>
<tbody>
<?php 
        foreach ($bb_posts as $bb_post) {
            ?>
	<tr id="post-<?php 
            post_id();
            ?>
"<?php 
            alt_class('post', post_del_class());
            ?>
>
		<td class="check-column"><input type="checkbox" name="post[]" value="<?php 
            post_id();
            ?>
" /></td>
		<td class="post">
			<?php 
            post_text();
            ?>
			<div>
				<span class="row-actions">
					<a href="<?php 
            echo esc_url(get_post_link());
            ?>
"><?php 
            _e('View');
            ?>
</a>
<?php 
            bb_post_admin(array('before_each' => ' | ', 'each' => array('undelete' => array('before' => ' ')), 'last_each' => array('before' => ' | ')));
            ?>
				</span>&nbsp;
			</div>
		</td>

		<td class="author">
			<?php 
            if (get_post_author_id()) {
                ?>

				<a href="<?php 
                user_profile_link(get_post_author_id());
                ?>
">
					<?php 
                post_author_avatar('16');
                ?>
					<?php 
                post_author();
                ?>
				</a>

			<?php 
            } else {
                ?>

				<span>
					<?php 
                post_author_avatar('16');
                ?>
					<?php 
                post_author();
                ?>
				</span>

			<?php 
            }
            ?>
		</td>

		<td class="topic">
			<a href="<?php 
            topic_link($bb_post->topic_id);
            ?>
"><?php 
            topic_title($bb_post->topic_id);
            ?>
</a>
		</td>
		
		<td class="date">
<?php 
            if (bb_get_post_time('U') < time() - 86400) {
                bb_post_time('Y/m/d\\<\\b\\r \\/\\>H:i:s');
            } else {
                printf(__('%s ago'), bb_get_post_time('since'));
            }
            ?>
		</td>
	</tr>
<?php 
        }
        ?>
</tbody>
</table>
<?php 
    }
}
Example #5
0
<?php

/*
  type: layout
  content_type: static
  name: Post
  description: Post layout
*/
$id = post_id();
$content = get_content_by_id($id);
?>


  <?php 
include TEMPLATE_DIR . "header.php";
?>
 <div class="container content edit" rel="content<?php 
print PAGE_ID();
?>
" field="content<?php 
print PAGE_ID();
?>
">
	<div class="row blog-page">
		<!-- Left Sidebar -->
		<div class="col-md-9">
			<!--Blog Post-->
			<div class="blog margin-bottom-40">
				<h2 class="headline edit" field="title" rel="content"><?php 
print $content['title'];
?>
?>
" class="<?php 
echo esc_attr($container_class);
?>
">
    <?php 
if ($mod_title_layout_part != '') {
    ?>
        <?php 
    echo $mod_settings['before_title'] . wp_kses_post(apply_filters('themify_builder_module_title', $mod_title_layout_part, $fields_args)) . $mod_settings['after_title'];
    ?>
    <?php 
}
?>

    <?php 
do_action('themify_builder_before_template_content_render');
?>

    <?php 
echo do_shortcode('[themify_layout_part slug=' . $selected_layout_part . ']');
?>

    <?php 
do_action('themify_builder_after_template_content_render');
?>
</div>
<!-- /module template_part -->
<?php 
self::$post_id = self::$layout_part_id;