示例#1
0
        ?>
                              </div>
                                <?php 
    } elseif (isset($_GET['action']) && $_GET['action'] == 'wishlist' && $current_user->ID == $uid) {
        $width = 370;
        $height = 278;
        ?>
                                <div class="cs-section-title about-title"><h3><?php 
        _e('Favorites', 'EDULMS');
        ?>
</h3></div>
                                <div class="courses">
                                    <div class="row">
                                        <?php 
        global $post, $cs_theme_options;
        $user = cs_get_user_id();
        if (isset($user) && $user != '') {
            $cs_wishlist = get_user_meta($user, 'cs-courses-wishlist', true);
            if (is_array($cs_wishlist) and !empty($cs_wishlist)) {
                $cs_wishlist = array_filter($cs_wishlist);
            }
        }
        if (!empty($cs_wishlist) && count($cs_wishlist) > 0) {
            $args = array('post__in' => $cs_wishlist, 'post_type' => 'courses', 'order' => "ASC");
            $custom_query = new WP_Query($args);
            if ($custom_query->have_posts()) {
                while ($custom_query->have_posts()) {
                    $custom_query->the_post();
                    $course_id = $course_post_id = $post->ID;
                    $cs_course = get_post_meta($post->ID, "cs_course", true);
                    $user_course_data_array = get_post_meta($course_id, "cs_user_course_data", true);
示例#2
0
    function cs_videos_watch_list()
    {
        global $cs_theme_option, $post;
        $user = cs_get_user_id();
        if (isset($user) && $user != '') {
            $cs_video_list = cs_get_user_metavalue('cs-video-watchlist');
            if (is_array($cs_video_list) && in_array(get_the_ID(), $cs_video_list)) {
                ?>
            <a class="cs-add cs-btnadd cs-btnpopover" data-container="body" data-toggle="tooltip" data-placement="top" 
                    title="<?php 
                _e('Already in watch list', 'LMS');
                ?>
"><i class="fa fa-plus cs-bgcolr"></i></a>
            <?php 
            } else {
                ?>
            <a class="cs-btnadd cs-btnpopover" onclick="cs_video_watchlist('<?php 
                echo esc_js(esc_url(admin_url('admin-ajax.php')));
                ?>
','<?php 
                echo esc_js($post->ID);
                ?>
','')" data-container="body" data-toggle="tooltip" data-placement="top" title="<?php 
                _e('Add to watch list', 'LMS');
                ?>
"> <i class="fa fa-plus"></i> </a>
<?php 
            }
        } else {
            cs_login_message(false);
        }
    }
示例#3
0
<?php

global $cs_theme_options;
$cs_theme_options = get_option('cs_theme_options');
if (isset($_GET['uid']) && $_GET['uid'] != '') {
    $user_id = $uid = $_GET['uid'];
} else {
    $user_id = $uid = cs_get_user_id();
}
$cs_course_options = get_option('cs_course_options');
$course_user_meta_array = get_option($user_id . "_cs_course_data", true);
if (isset($course_user_meta_array) && is_array($course_user_meta_array) && count($course_user_meta_array) > 0) {
    $cs_lms = get_option('cs_lms_plugin_activation');
    ?>
    <div class="my-courses">
    	<div class="cs-table">
            <ul class="top-sec">
                <li><?php 
    _e('Curso', 'EDULMS');
    ?>
</li>
                <!--<li><?php 
    //_e('Maestro','EDULMS');
    ?>
</li>-->
                <li><?php 
    _e('Estado', 'EDULMS');
    ?>
</li>
                <li></li>
            </ul>