<p>This content is for members only.<br /><a href="<?php echo $site_url; ?> /wp-login.php">Log In</a> <a href="<?php echo $site_url; ?> /wp-login.php?action=register">Register</a></p> </div><!-- .entry --> <div class="clearfix"> </div> </div> </div> <!-- END PORTLET--> </div> </div> <div class="row"> <div class="col-md-8 col-sm-8 col-sm-offset-2 col-md-offset-2"> <p class="notice"> <?php wpex_copyright_dashboard(); ?> </p> </div> </div> </div> </div> <!-- END MESSAGE --> <?php } get_footer('dashboard');
function bundlesandbonuses_videos_func($atts) { //-> ONLY premium. if (pmpro_hasMembershipLevel(array(6, 7, 12, 14))) { global $wpdb, $pmpro_msg, $pmpro_msgt, $pmpro_levels, $current_user, $levels; $type = 'video'; $max_count = 0; /* +===================================+ | BEGIN 'Mandarin' | +===================================+ */ $bundlesandbonuses = array(); $empty_bundlesandbonuses = true; $args = array('post_type' => array($type), 'post_status' => 'publish', 'posts_per_page' => '-1', 'caller_get_posts' => 1, 'tax_query' => array(array('taxonomy' => 'categories', 'field' => 'id', 'terms' => 20))); $bundlesandbonuses_query = null; $bundlesandbonuses_query = new WP_Query($args); if ($bundlesandbonuses_query->have_posts()) { while ($bundlesandbonuses_query->have_posts()) { $bundlesandbonuses_query->the_post(); $thumbnail = ""; $video_custom_thumbnail = get_field('video_custom_thumbnail', $post_id = $post->ID); if (!empty($video_custom_thumbnail)) { $video_thumbnail_url = $video_custom_thumbnail; } else { $video_thumbnail_url = get_field('video_thumbnail', $post_id = $post->ID); } if (!empty($video_thumbnail_url)) { $thumbnail = '<img src="' . $video_thumbnail_url . '" alt="" class="img-responsive">'; } $col = '<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">' . '<a class="dashboard-stat bundlesandbonuses dashboard-stat-light blue-soft" href="' . get_the_permalink($post_id = $post->ID) . '">' . '<div class="visual">' . '<div class="overlay"></div>' . $thumbnail . '</div>' . '<div class="details">' . '<div class="number">' . the_title($before = '', $after = '', $echo = false) . '</div>' . '</div>' . '<span class="caption-helper">' . '<ul class="post-meta clr">' . '<li class="meta-date">' . 'Posted on <span class="meta-date-text">' . get_the_date() . '</span>' . '</li>' . '</ul><!-- .post-meta -->' . '</span>' . '</a>' . '</div>'; $return_membership_levels = pmpro_has_membership_access($post_id = $post->ID, $user_id = $current_user->ID, $return_membership_levels = true); if (empty($return_membership_levels[2]) && $return_membership_levels[0]) { $hasaccess = FALSE; } else { $hasaccess = $return_membership_levels[0]; } if ($hasaccess) { $bundlesandbonuses[] = $col; } } } $tmp = count($bundlesandbonuses); if ($tmp > $max_count) { $max_count = $tmp; } wp_reset_query(); ?> <!-- BEGIN VIDEOS MENU--> <div class="row top-category"> <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> <div class="easy-pie-chart"> <div class="number transactions" data-percent="55"> <img src="<?php echo get_template_directory_uri(); ?> /assets/global/img/AR_bundles_icon.png" alt="" class=""/> </div> <a class="title" href="#"> Bundles & Bonuses </a> </div> </div> </div> <div class="clearfix"> </div> <div class="dashboard-page-bar" > <div class="line-full-width" ></div> <div class="line-container-left" > <div class="line" > <div class="arrow-down" > </div> </div> </div> <div class="middle-container-left" > <div class="line-middle" > <div class="line" > <div class="arrow-down" > </div> </div> </div> </div> <div class="middle-container-right" > <div class="line-middle-right" > <div class="line" > <div class="arrow-down" > </div> </div> </div> </div> <div class="line-container-right" > <div class="line" > <div class="arrow-down" > </div> </div> </div> </div> <div class="clearfix"> </div> <!-- END VIDEOS MENU--> <!-- BEGIN VIDEO LIST--> <div class="row init-row"> <?php if ($max_count > 0) { ?> <?php $row = 1; ?> <?php for ($i = 0; $i <= $max_count; $i++) { ?> <?php if (isset($bundlesandbonuses[$i])) { if ($row == 1) { echo '<div class="row">'; } echo $bundlesandbonuses[$i]; if ($row >= 4 || $i == $max_count) { echo '</div>'; $row = 0; } $row = $row + 1; } ?> <?php } ?> <?php } else { ?> <div class="col-lg-12 col-md-12 col-sm-6 col-xs-12"> <a class="dashboard-stat bundlesandbonuses dashboard-stat-light blue-soft" href="javascript:void(0);"> <p> There are no videos yet for this Subscription plan on this category. <span class="meta-date-text">Check back soon!</span> </p> </a> </div> <?php } ?> </div> <?php } else { ?> <br> <div class="row top-category no-allow"> <div class="col-lg-12 col-md-12 col-sm-6 col-xs-12"> <p> This content is for <span class="meta-date-text">Premium</span> members only. Visit the site and log in/register. </p> </div> </div> <?php } ?> <div class="clearfix"> </div> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> <p class="notice"> <?php wpex_copyright_dashboard(); ?> </p> </div> </div> <!-- END VIDEOS LIST--> <?php }