コード例 #1
0
ファイル: ajax_v1.php プロジェクト: bpenchas/cnect
/**
 * [AJAX] Get the array of categories.
 *
 * @return [JSON] (String) The requested category data.
 */
function ajax_categories()
{
    header('Content-Type: text/javascript');
    $wp_categories = get_categories();
    $response_categories = array();
    foreach ($wp_categories as $category) {
        $response_categories[] = array('ID' => $category->term_id, 'title' => $category->name, 'subtitle' => category_subtitle($category->term_id), 'tagline' => category_tagline($category->term_id), 'parent' => $category->parent, 'size' => $category->count, 'featuredImageURL' => category_featured_image_URL($category->term_id));
    }
    echo json_encode($response_categories);
    die;
}
コード例 #2
0
ファイル: header.php プロジェクト: bpenchas/cnect
                    <h6>CENTRAL NETWORK OF</h6>
                    <h6>ENTREPRENEURIAL COLLEGIATE TEAMS</h6>
                    <h1 id="title">CNECT</h1>
            <?php 
}
?>
            
        </div>
        <div id="titlecaption">

            <?php 
if (!is_home()) {
    ?>

                <h5 class="caption"><?php 
    echo category_subtitle($category_id);
    ?>
</h5>
                <h5 class="subcaption"><?php 
    echo str_replace("\n", "<br />", category_tagline($category_id));
    ?>
</h5>

            <?php 
} else {
    ?>

                <h5 class="caption">Welcome to CNECT</h5>
                <h5 class="subcaption">Engage in larger conversation about entrepreneurship with students all around the world.</h5>
            
            <?php