本文整理汇总了PHP中bp_course_the_item函数的典型用法代码示例。如果您正苦于以下问题:PHP bp_course_the_item函数的具体用法?PHP bp_course_the_item怎么用?PHP bp_course_the_item使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bp_course_the_item函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: child_course_filter
//.........这里部分代码省略.........
<div class="pag-count" id="course-dir-count-top">
<?php
bp_course_pagination_count();
?>
</div>
<div class="pagination-links" id="course-dir-pag-top">
<?php
bp_course_item_pagination();
?>
</div>
</div>
<?php
do_action('bp_before_directory_course_list');
$cookie = urldecode($_POST['cookie']);
if (stripos($cookie, 'course_directory=grid')) {
$class = 'grid';
}
?>
<ul id="course-list" class="item-list <?php
echo $class;
?>
" role="main">
<?php
while (bp_course_has_items()) {
bp_course_the_item();
?>
<li>
<div class="item-avatar">
<?php
bp_course_avatar();
?>
</div>
<div class="item">
<div class="item-title"><?php
bp_course_title();
?>
</div>
<div class="item-meta"><?php
bp_course_meta();
?>
</div>
<div class="item-desc"><?php
bp_course_desc();
?>
</div>
<div class="item-credits">
<?php
bp_course_credits();
?>
</div>
<div class="item-instructor">
<?php
bp_course_instructor();
?>
示例2: get_header
<?php
get_header('buddypress');
$vibe = Wplms_Modern_Init::init();
$bg = get_post_meta(get_the_ID(), 'vibe_course_bg', true);
if (empty($bg)) {
$url = $vibe->option('hero_img');
} else {
$url = wp_get_attachment_image_src($bg, 'full');
}
if (bp_course_has_items()) {
while (bp_course_has_items()) {
bp_course_the_item();
?>
<section id="content">
<div id="buddypress">
<div class="course_header">
<?php
do_action('bp_before_course_home_content');
?>
<div id="item-header" role="complementary" <?php
echo empty($url) ? '' : 'style="background:url(' . (is_array($url) ? $url[0] : $url) . ') 50% 50% no-repeat;"';
?>
>
<?php
locate_template(array('course/single/course-header.php'), true);
?>
示例3: course_filter
//.........这里部分代码省略.........
<div class="pag-count" id="course-dir-count-top">
<?php
bp_course_pagination_count();
?>
</div>
<div class="pagination-links" id="course-dir-pag-top">
<?php
bp_course_item_pagination();
?>
</div>
</div>
<?php
do_action('bp_before_directory_course_list');
$cookie = urldecode($_POST['cookie']);
if (stripos($cookie, 'bp-course-list=grid')) {
$class = 'grid';
}
?>
<ul id="course-list" class="item-list <?php
echo apply_filters('wplms_course_directory_list', $class);
?>
" role="main">
<?php
while (bp_course_has_items()) {
bp_course_the_item();
?>
<?php
global $post;
$cache_duration = vibe_get_option('cache_duration');
if (!isset($cache_duration)) {
$cache_duration = 86400;
}
if ($cache_duration) {
$course_key = 'course_' . $post->ID;
if (is_user_logged_in()) {
$user_id = get_current_user_id();
$user_meta = get_user_meta($user_id, $post->ID, true);
if (isset($user_meta)) {
$course_key = 'course_' . $user_id . '_' . get_the_ID();
}
}
$result = wp_cache_get($course_key, 'course_loop');
} else {
$result = false;
}
if (false === $result) {
ob_start();
bp_course_item_view();
$result = ob_get_clean();
}
if ($cache_duration) {
wp_cache_set($course_key, $result, 'course_loop', $cache_duration);
}
echo $result;
?>