本文整理汇总了PHP中learn_press_get_template函数的典型用法代码示例。如果您正苦于以下问题:PHP learn_press_get_template函数的具体用法?PHP learn_press_get_template怎么用?PHP learn_press_get_template使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了learn_press_get_template函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: confirm_order
static function confirm_order($atts = null)
{
$atts = shortcode_atts(array('order_id' => !empty($_REQUEST['order_id']) ? intval($_REQUEST['order_id']) : 0), $atts);
$order_id = null;
extract($atts);
ob_start();
$order = learn_press_get_order($order_id);
if ($order) {
learn_press_get_template('order/confirm.php', array('order' => $order));
}
return ob_get_clean();
}
示例2: learn_press_get_template
<?php
global $wp_query;
learn_press_get_template('order/order-details.php', array('order' => $order));
?>
<a href="<?php
echo learn_press_get_page_link('profile');
?>
"><?php
_e('My Profile', 'learn_press');
?>
</a>
示例3: learn_press_profile_tab_orders_content
function learn_press_profile_tab_orders_content($current, $tab, $user)
{
learn_press_get_template('profile/tabs/orders.php', array('user' => $user, 'current' => $current, 'tab' => $tab));
}
示例4: do_action
<?php
do_action('learn_press_before_quiz_results');
do_action('learn_press_before_enrolled_course');
$my_query = learn_press_get_enrolled_courses($user->ID);
$check = 0;
if ($my_query->have_posts()) {
while ($my_query->have_posts()) {
$my_query->the_post();
$quizzes = learn_press_get_quizzes(get_the_ID());
do_action('learn_press_before_quiz_result');
foreach ($quizzes as $quiz) {
if (learn_press_user_has_completed_quiz($user->ID, $quiz)) {
$check = 1;
learn_press_get_template('profile/quiz-content.php', array('user_id' => $user->ID, 'quiz_id' => $quiz));
}
}
do_action('learn_press_after_quiz_result');
}
if (!$check) {
do_action('learn_press_before_no_completed_quiz');
echo '<p>' . __('You have not finished any quizzes yet!', 'learn_press') . '</p>';
do_action('learn_press_after_no_completed_quiz');
}
} else {
do_action('learn_press_before_no_enrolled_course');
echo '<p>' . __('You have not taken any courses yet!', 'learn_press') . '</p>';
do_action('learn_press_after_no_enrolled_course');
}
do_action('learn_press_after_enrolled_course');
wp_reset_postdata();
示例5: get_prev_item_html
function get_prev_item_html($current_item = false)
{
if ($next_item = $this->get_next_item($current_item, 'prev')) {
ob_start();
learn_press_get_template('lesson/prev-button.php', array('item' => $next_item, 'course' => $this));
return ob_get_clean();
}
return false;
}
示例6: get_header
<?php
if (!defined('ABSPATH')) {
exit;
// Exit if accessed directly
}
get_header();
?>
<?php
do_action('learn_press_before_main_content');
?>
<?php
while (have_posts()) {
the_post();
learn_press_get_template('course_content.php');
if (comments_open() || get_comments_number()) {
comments_template();
}
}
?>
<?php
do_action('learn_press_after_main_content');
get_footer();
示例7: get_content_plain
function get_content_plain()
{
ob_start();
learn_press_get_template($this->template_plain, array('email_heading' => $this->get_heading(), 'footer_text' => $this->get_footer_text(), 'site_title' => $this->get_blogname(), 'course_name' => get_the_title($this->object['course']), 'login_url' => learn_press_get_login_url(), 'user_name' => $this->object['user']->user_nicename, 'plain_text' => true));
return ob_get_clean();
}
示例8: learn_press_single_quiz_questions_nav
/**
* Output the navigation to next and previous questions
*/
function learn_press_single_quiz_questions_nav()
{
learn_press_get_template('single-quiz/nav.php');
}
示例9: localize_printed_scripts
static function localize_printed_scripts()
{
if (self::$scripts) {
foreach (self::$scripts as $handle) {
self::localize_script($handle);
self::script_params($handle);
if (!empty(self::$wp_script_codes[$handle])) {
learn_press_get_template('global/scripts.php', array('code' => self::$wp_script_codes[$handle]));
unset(self::$wp_script_codes[$handle]);
}
}
}
}
示例10: str_replace
$post_type = str_replace('lp_', '', $item->post_type);
if (!in_array($post_type, array('lesson', 'quiz', 'assignment'))) {
continue;
}
$args = array('item' => $item, 'section' => $section);
/*switch( $item->post_type ){
case LP()->lesson_post_type:
$GLOBALS['lesson'] = LP_Lesson::get_lesson( $item );
break;
case LP()->quiz_post_type:
$GLOBALS['quiz'] = LP_Quiz::get_quiz( $item );
break;
default:
do_action( 'learn_press_section_setup_loop_item', $item, $section );
}*/
learn_press_get_template("single-course/section/item-{$post_type}.php", $args);
}
?>
<?php
} else {
?>
<li class="course-item section-empty"><?php
learn_press_display_message(__('No items in this section', 'learn_press'));
?>
</li>
<?php
}
?>
</ul>
示例11: tab_quizzes_content
function tab_quizzes_content()
{
learn_press_get_template('profile/tabs/quizzes.php', array('user' => $this));
}
示例12: get_content_plain
function get_content_plain()
{
ob_start();
learn_press_get_template($this->template_plain, array('email_heading' => $this->get_heading(), 'site_title' => $this->get_blogname(), 'course_name' => get_the_title($this->object['course']), 'course_date' => get_the_date($this->object['course']), 'course_link' => get_the_permalink($this->object['course']), 'course_edit_link' => get_edit_post_link($this->object['course']), 'plain_text' => true));
return ob_get_clean();
}
示例13: get_content_plain
function get_content_plain()
{
ob_start();
learn_press_get_template($this->template_plain, array('email_heading' => $this->get_heading(), 'site_title' => $this->get_blogname(), 'course_id' => $this->object['course'], 'plain_text' => true));
return ob_get_clean();
}
示例14: foreach
if ($payment_heading) {
?>
<h3><?php
echo $payment_heading;
?>
</h3>
<?php
}
?>
<div id="learn-press-payment" class="learn-press-checkout-payment">
<ul class="payment-methods">
<?php
if (!empty($available_gateways)) {
foreach ($available_gateways as $gateway) {
learn_press_get_template('checkout/payment-method.php', array('gateway' => $gateway));
}
} else {
$no_gateways_message = __('No available payment methods.', 'learn_press');
echo '<li>' . apply_filters('learn_press_no_available_payment_methods_message', $no_gateways_message) . '</li>';
}
?>
</ul>
<div class="place-order-action">
<?php
do_action('learn_press_order_before_submit');
?>
<?php
示例15: foreach
}
?>
<?php
if ($courses) {
?>
<ul class="profile-courses courses-list enrolled">
<?php
foreach ($courses as $post) {
setup_postdata($post);
?>
<?php
learn_press_get_template('profile/tabs/courses/loop.php');
?>
<?php
}
?>
</ul>
<?php
} else {
?>
<?php
learn_press_display_message(__('You have not finished any courses yet!', 'learn_press'));
?>