Example #1
0
		<?php 
if (has_post_thumbnail()) {
    echo '<div class="post-thumb">';
    the_post_thumbnail();
    echo '</div><br />';
}
?>
        <?php 
the_content();
?>
        <?php 
wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'skt-white'), 'after' => '</div>'));
?>
        <div class="postmeta">
            <div class="post-categories"><?php 
echo getPostCategories();
?>
</div>
            <div class="post-tags"><?php 
the_tags(' | Tags: ', ', ', '<br />');
?>
 </div>
            <div class="clear"></div>
        </div><!-- postmeta -->
    </div><!-- .entry-content -->
   
    <footer class="entry-meta">
        <?php 
edit_post_link(__('Edit', 'skt_white'), '<span class="edit-link">', '</span>');
?>
    </footer><!-- .entry-meta -->
Example #2
0
?>
</th>
                </tr>
                <?php 
while ($row = $res->fetch_assoc()) {
    if (isset($row['post_author'])) {
        $username = Users::getUserById($row['post_author']);
    }
    if ($row['post_status'] == 'Initialized') {
        $status = _e('initialized', '', '', true);
        $statcolor = "style='text-align: center; color: red;'";
    } else {
        $status = _e('published', '', '', true);
        $statcolor = "style='text-align: center;'";
    }
    $first_cat = getPostCategories($row['ID'])[0];
    echo "<tr><td style='text-align: center; vertical-align: middle;'>" . $row['ID'] . "</td><td style='text-align: center; vertical-align: middle;'><a href='?switch=users&sub=edit_user&id=" . $row['post_author'] . "'>" . $username['username'] . "</a></td><td>" . $row['post_title'] . "</td><td style='text-align: center; vertical-align: middle;'><a href='?switch=categories&sub=edit_category&id=" . $first_cat . "'>" . getCategoryById($first_cat) . "</a></td><td " . $statcolor . ">" . $status . "<br>" . "<span style='text-align: center;'><a onclick=\"return confirm('Are you sure?');\" href='?switch=manage_posts&sub=delete_post&id=" . $row['ID'] . "'>" . _e('delete', '', '', true) . "</a></span>" . "<br>" . "<span style='text-align: center;'><a href='?switch=new_post&sub=edit_post&id=" . $row['ID'] . "'>" . _e('edit', '', '', true) . "</a></span></td><td style='text-align: center; vertical-align: middle;'>" . addZerosToShow(LBDP($row['post_date'])) . "</td></tr>";
}
$res->free();
?>
                </table>
                <?php 
$home = "?switch=users&sub=edit_user";
?>
                <!--<script>
                    function gotoEdit(ref)
                    {
                        var id = ref.id;
                        window.location.assign("<?php 
echo $home;
?>
Example #3
0
include_once 'sidebar.php';
?>

        <div class="col-xs-12 col-sm-12 col-md-4 col-lg-4 col-md-offset-1 col-lg-offset-1 div_white_left">
            <article class="post">
                <a href="<?php 
echo $posts->getPostPermLink($row['ID'], $row['post_type'], $row['link_title']);
?>
"><h3 style="font-weight: bold;"><?php 
echo strip_tags($row['post_title']);
?>
</h3></a>&nbsp;&nbsp;<span style="color: #808080;"><i style="vertical-align: middle;" class="mdi mdi-calendar"></i>&nbsp;<?php 
echo englishConvertDate($row['post_date']);
?>
&nbsp;<i style="vertical-align: middle;" class="mdi mdi-file"></i>&nbsp;<?php 
echo getCategoryById(getPostCategories($row['ID'])[0]);
?>
</span>
                <p><?php 
echo $row['post_excerpt'];
?>
</p>
                <p><?php 
echo $row['post_content'];
?>
</p>
                <?php 
if (Users::getUsernameBySeassion() !== false && Users::isAdmin(Users::getUsernameBySeassion())) {
    ?>
                <div align="right"><a href="<?php 
    echo $posts->getPostEditLink($row['ID']);
Example #4
0
/**
 * Get first post category
 * @param  integer  $post_id 
 * @param  boolean $print   
 * @return mixed
 */
function getFirstCategory($post_id)
{
    $obj = "";
    $cats = getPostCategories($post_id);
    if ($cats) {
        $obj = $cats[0];
    }
    return $obj;
}