本文整理汇总了PHP中the_sub_title函数的典型用法代码示例。如果您正苦于以下问题:PHP the_sub_title函数的具体用法?PHP the_sub_title怎么用?PHP the_sub_title使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了the_sub_title函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_permalink
<section id="title">
<div class="container">
<div class="row">
<div class="col-md-9 col-sm-8">
<div class="pagetitle">
<span><?php
echo '<a href="' . get_permalink($course) . '">' . get_the_title($course) . '</a>';
?>
</span>
<h1>
<?php
the_title();
?>
</h1>
<?php
the_sub_title();
?>
</div>
</div>
<div class="col-md-3 col-sm-4">
<?php
$course_id = get_post_meta(get_the_ID(), 'vibe_assignment_course', true);
if (isset($course_id) && is_numeric($course_id)) {
if (is_user_logged_in()) {
$user_id = get_current_user_id();
if (wplms_user_course_active_check($user_id, $course_id)) {
$take_course_page = get_permalink(vibe_get_option('take_course_page'));
echo '<form action="' . $take_course_page . '" method="post">';
echo '<input type="submit" class="button full create-group-button" value="' . __('Back to Course', 'vibe') . '">';
wp_nonce_field('continue_course' . $user_id, 'continue_course');
echo '<input type="hidden" name="course_id" value="' . $course_id . '" />';
开发者ID:Nguyenkain,项目名称:Elearning,代码行数:31,代码来源:single-wplms-assignment.php
示例2: unit_traverse1
//.........这里部分代码省略.........
do_action('wplms_unit_header', $unit_id, $course_id);
}
echo '<div id="unit" class="quiz_title" data-unit="' . $unit_id . '">';
the_unit_tags($unit_id);
the_unit_instructor($unit_id);
$minutes = 0;
$mins = get_post_meta($unit_id, 'vibe_duration', true);
$unit_duration_parameter = apply_filters('vibe_unit_duration_parameter', 60);
if ($mins) {
if ($mins > $unit_duration_parameter) {
$hours = floor($mins / $unit_duration_parameter);
$minutes = $mins - $hours * $unit_duration_parameter;
} else {
$minutes = $mins;
}
do_action('wplms_course_unit_meta');
if ($mins < 9999) {
if ($unit_duration_parameter == 1) {
echo '<span><i class="icon-clock"></i> ' . (isset($hours) ? $hours . __(' Minutes', 'vibe') : '') . ' ' . $minutes . __(' seconds', 'vibe') . '</span>';
} else {
if ($unit_duration_parameter == 60) {
echo '<span><i class="icon-clock"></i> ' . (isset($hours) ? $hours . __(' Hours', 'vibe') : '') . ' ' . $minutes . __(' minutes', 'vibe') . '</span>';
} else {
if ($unit_duration_parameter == 3600) {
echo '<span><i class="icon-clock"></i> ' . (isset($hours) ? $hours . __(' Days', 'vibe') : '') . ' ' . $minutes . __(' hours', 'vibe') . '</span>';
}
}
}
}
}
echo '<div class="clear"></div>';
echo '<h1>' . get_the_title($unit_id) . '</h1>';
echo '<h3>';
the_sub_title($unit_id);
echo '</h3></div>';
the_unit($unit_id);
$unit_class = 'unit_button';
$hide_unit = 0;
$nextunit_access = vibe_get_option('nextunit_access');
$k = array_search($unit_id, $units);
$done_flag = get_user_meta($user_id, $unit_id, true);
$next = $k + 1;
$prev = $k - 1;
$max = count($units) - 1;
echo '<div class="unit_prevnext">';
echo '<div class="col-md-2"> <span class="backtocourse" data-id="' . $course_id . '"><i class="icon-arrow-1-left"></i> Trở về khóa học </span></div>';
echo '<div class="col-md-2">';
if ($prev >= 0) {
if (get_post_type($units[$prev]) == 'quiz') {
$quiz_status = get_user_meta($user_id, $units[$prev], true);
if (!empty($quiz_status)) {
echo '<a href="#" data-unit="' . $units[$prev] . '" class="' . $unit_class . '">' . __('Back to Quiz', 'vibe') . '</a>';
} else {
echo '<a href="' . get_permalink($units[$prev]) . '" class="unit_button">' . __('Back to Quiz', 'vibe') . '</a>';
}
} else {
echo '<a href="#" id="prev_unit" data-unit="' . $units[$prev] . '" class="unit unit_button">' . __('Previous Unit', 'vibe') . '</a>';
}
}
echo '</div>';
echo '<div class="col-md-2">';
if ($next <= $max) {
if (isset($nextunit_access) && $nextunit_access) {
$hide_unit = 1;
if (isset($done_flag) && $done_flag) {
$unit_class .= ' ';
开发者ID:songlequang,项目名称:myclass,代码行数:67,代码来源:functions.php
示例3: do_action
<?php
do_action('bp_before_create_group_content_template');
?>
<section id="grouptitle">
<div class="container">
<div class="row">
<div class="col-md-9 col-sm-8">
<div class="pagetitle">
<h1><?php
echo get_the_title($id);
?>
</h1>
<?php
the_sub_title($id);
?>
</div>
</div>
<div class="col-md-3 col-sm-4">
<?php
if (is_user_logged_in() && bp_user_can_create_groups()) {
?>
<a class="button create-group-button full"
href="<?php
echo trailingslashit(bp_get_root_domain() . '/' . bp_get_groups_root_slug());
?>
"><?php
_e('Groups Directory', 'vibe');
?>
开发者ID:inetbiz,项目名称:wordpress-lms,代码行数:29,代码来源:create.php
示例4: unit_traverse
function unit_traverse()
{
$unit_id = $_POST['id'];
$course_id = $_POST['course_id'];
if (!isset($_POST['security']) || !wp_verify_nonce($_POST['security'], 'security')) {
_e('Security check Failed. Contact Administrator.', 'vibe');
die;
}
//verify unit in course
$units = bp_course_get_curriculum_units($course_id);
if (!in_array($unit_id, $units)) {
_e('Unit not in Course', 'vibe');
die;
}
// Check if user has taken the course
$user_id = get_current_user_id();
$coursetaken = get_user_meta($user_id, $course_id, true);
if (!isset($_COOKIE['course'])) {
if ($coursetaken > time()) {
setcookie('course', $course_id, $expire, '/');
$_COOKIE['course'] = $course_id;
} else {
$pid = get_post_meta($course_id, 'vibe_product', true);
$pid = apply_filters('wplms_course_product_id', $pid, $course_id, -1);
// $id checks for Single Course page or Course page in the my courses section
if (is_numeric($pid)) {
$pid = get_permalink($pid);
}
echo '<div class="message"><p>' . __('Course Expired.', 'vibe') . '<a href="' . $pid . '" class="link alignright">' . __('Click to renew', 'vibe') . '</a></p></div>';
die;
}
}
if (isset($coursetaken) && $coursetaken) {
if (!bp_course_check_unit_complete($unit_id, $user_id)) {
// IF unit not completed by user
// Drip Feed Check
$drip_enable = get_post_meta($course_id, 'vibe_course_drip', true);
if (vibe_validate($drip_enable)) {
$drip_duration = get_post_meta($course_id, 'vibe_course_drip_duration', true);
$drip_duration_parameter = apply_filters('vibe_drip_duration_parameter', 86400, $course_id);
$total_drip_turation = apply_filters('vibe_total_drip_duration', $drip_duration * $drip_duration_parameter, $course_id, $unit_id);
$unitkey = array_search($unit_id, $units);
for ($i = $unitkey - 1; $i >= 0; $i--) {
if (get_post_type($units[$i]) == 'unit') {
$pre_unit_key = $i;
break;
}
}
if ($unitkey == 0) {
// Start of Course
$pre_unit_time = bp_course_get_drip_access_time($units[$unitkey], $user_id);
if (!isset($pre_unit_time) || $pre_unit_time == '') {
bp_course_update_drip_access_time($units[$unitkey], $user_id, time());
if (is_numeric($units[1])) {
//Parmas : Next Unit, Next timestamp, course_id, userid
do_action('wplms_start_unit', $units[$unitkey], $course_id, $user_id, $units[1], time() + $drip_duration * $drip_duration_parameter);
}
}
} else {
//Continuation of Course
$pre_unit_time = get_post_meta($units[$pre_unit_key], $user_id, true);
if (isset($pre_unit_time) && $pre_unit_time) {
$value = $pre_unit_time + $drip_duration * $drip_duration_parameter;
$value = apply_filters('wplms_drip_value', $value, $units[$pre_unit_key], $course_id, $units[$unitkey]);
//print_r(date('l jS \of F Y h:i:s A',$value).' > '.date('l jS \of F Y h:i:s A',time()));
if ($value > time()) {
echo '<div class="message"><p>' . __('Unit will be available in ', 'vibe') . tofriendlytime($value - time()) . '</p></div>';
die;
} else {
$pre_unit_time = get_post_meta($units[$unitkey], $user_id, true);
if (!isset($pre_unit_time) || $pre_unit_time == '') {
update_post_meta($units[$unitkey], $user_id, time());
//Parmas : Next Unit, Next timestamp, course_id, userid
do_action('wplms_start_unit', $units[$unitkey], $course_id, $user_id, $units[$unitkey + 1], time() + $drip_duration * $drip_duration_parameter);
}
}
} else {
echo '<div class="message"><p>' . __('Unit can not be accessed.', 'vibe') . '</p></div>';
die;
}
}
}
// Drip enabled
}
// END Drip Feed Check
echo '<div id="unit" class="' . get_post_type($unit_id) . '_title" data-unit="' . $unit_id . '">';
do_action('wplms_unit_header', $unit_id, $course_id);
$duration = get_post_meta($unit_id, 'vibe_duration', true);
$unit_duration_parameter = apply_filters('vibe_unit_duration_parameter', 60, $unit_id);
if ($duration) {
do_action('wplms_course_unit_meta', $unit_id);
echo '<span><i class="icon-clock"></i> ' . tofriendlytime($unit_duration_parameter * $duration) . '</span>';
}
echo '<br /><h1>' . get_the_title($unit_id) . '</h1>';
the_sub_title($unit_id);
echo '<div class="clear"></div>';
echo '</div>';
the_unit($unit_id);
$unit_class = 'unit_button';
$hide_unit = 0;
//.........这里部分代码省略.........
开发者ID:nikitansk,项目名称:devschool,代码行数:101,代码来源:bp-course-ajax.php
注:本文中的the_sub_title函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论