function adrotate_shortcode($atts, $content = null) { global $adrotate_config; $banner_id = $group_ids = 0; if (!empty($atts['banner'])) { $banner_id = trim($atts['banner'], "\r\t "); } if (!empty($atts['group'])) { $group_ids = trim($atts['group'], "\r\t "); } if (!empty($atts['fallback'])) { $fallback = 0; } // Not supported in free version if (!empty($atts['weight'])) { $weight = 0; } // Not supported in free version if (!empty($atts['site'])) { $site = 0; } // Not supported in free version $output = ''; if ($adrotate_config['w3caching'] == "Y") { $output .= '<!-- mfunc ' . W3TC_DYNAMIC_SECURITY . ' -->'; } if ($banner_id > 0 and $group_ids == 0) { // Show one Ad if ($adrotate_config['supercache'] == "Y") { $output .= '<!--mfunc echo adrotate_ad(' . $banner_id . ', true, 0, 0) -->'; } $output .= adrotate_ad($banner_id, true, 0, 0); if ($adrotate_config['supercache'] == "Y") { $output .= '<!--/mfunc-->'; } } if ($banner_id == 0 and $group_ids > 0) { // Show group if ($adrotate_config['supercache'] == "Y") { $output .= '<!--mfunc echo adrotate_group(' . $group_ids . ', 0, 0, 0) -->'; } $output .= adrotate_group($group_ids, 0, 0, 0); if ($adrotate_config['supercache'] == "Y") { $output .= '<!--/mfunc-->'; } } if ($adrotate_config['w3caching'] == "Y") { $output .= '<!-- /mfunc -->'; } return $output; }
function widget($args, $instance) { global $adrotate_config, $blog_id; extract($args); if (empty($instance['adid'])) { $instance['adid'] = 0; } if (empty($instance['siteid'])) { $instance['siteid'] = $blog_id; } if (empty($instance['title'])) { $instance['title'] = ''; } $title = apply_filters('widget_title', $instance['title']); echo $before_widget; if ($title) { echo $before_title . $title . $after_title; } if ($adrotate_config['widgetalign'] == 'Y') { echo '<ul><li>'; } if ($adrotate_config['w3caching'] == 'Y') { echo '<!-- mfunc ' . W3TC_DYNAMIC_SECURITY . ' -->'; } if ($instance['type'] == "single") { if ($adrotate_config['supercache'] == "Y") { echo '<!--mfunc echo adrotate_ad(' . $instance['adid'] . ', true, 0, 0, ' . $instance['siteid'] . ') -->'; } echo adrotate_ad($instance['adid'], true, 0, 0, 0); if ($adrotate_config['supercache'] == "Y") { echo '<!--/mfunc-->'; } } if ($instance['type'] == "group") { if ($adrotate_config['supercache'] == "Y") { echo '<!--mfunc echo adrotate_group(' . $instance['adid'] . ', 0, 0, ' . $instance['siteid'] . ') -->'; } echo adrotate_group($instance['adid'], 0, 0, 0); if ($adrotate_config['supercache'] == "Y") { echo '<!--/mfunc-->'; } } if ($adrotate_config['w3caching'] == 'Y') { echo '<!-- /mfunc -->'; } if ($adrotate_config['widgetalign'] == 'Y') { echo '</li></ul>'; } echo $after_widget; }
function adrotate_shortcode($atts, $content = null) { global $adrotate_config; $banner_id = $group_ids = $fallback = $weight = $site = 0; if (!empty($atts['banner'])) { $banner_id = trim($atts['banner'], "\r\t "); } if (!empty($atts['group'])) { $group_ids = trim($atts['group'], "\r\t "); } if (!empty($atts['fallback'])) { $fallback = trim($atts['fallback'], "\r\t "); } // Optional for groups (override) if (!empty($atts['weight'])) { $weight = trim($atts['weight'], "\r\t "); } // Optional for groups (override) if (!empty($atts['site'])) { $site = trim($atts['site'], "\r\t "); } // Optional for site (override) $output = ''; if ($adrotate_config['w3caching'] == "Y") { $output .= '<!-- mfunc ' . W3TC_DYNAMIC_SECURITY . ' -->'; if ($banner_id > 0 and ($group_ids == 0 or $group_ids > 0)) { // Show one Ad $output .= 'echo adrotate_ad(' . $banner_id . ', true, 0, ' . $site . ');'; } if ($banner_id == 0 and $group_ids > 0) { // Show group $output .= 'echo adrotate_group(' . $group_ids . ', ' . $fallback . ', ' . $weight . ', ' . $site . ');'; } $output .= '<!-- /mfunc ' . W3TC_DYNAMIC_SECURITY . ' -->'; } else { if ($banner_id > 0 and ($group_ids == 0 or $group_ids > 0)) { // Show one Ad $output .= adrotate_ad($banner_id, true, 0, $site); } if ($banner_id == 0 and $group_ids > 0) { // Show group $output .= adrotate_group($group_ids, $fallback, $weight, $site); } } return $output; }
</figcaption> </figure> </div> <?php } ?> </div> <?php } ?> </div> <div class="col-md-12 col-sm-12- col-xs-12"> <section id="wrapp-adv-device"><?php echo adrotate_ad($adv_count); ?> </section> </div> </div> </div> <?php break; default: break; } } $count++; $adv_count++; if ($count > 4) {
/** * The template for displaying all single posts. * * @package Awaken */ get_header(); ?> <div class="row"> <?php is_rtl() ? $rtl = 'awaken-rtl' : ($rtl = ''); ?> <!--QuangTrang--> <div class="col-xs-1 col-sm-1 col-md-2" style="position: fixed; margin-bottom:50px"><?php echo adrotate_ad(2); ?> </div> <div class="col-xs-1 col-sm-1 col-md-2" style="width:180px"></div> <!--QuangTrangEnd--> <div class="col-xs-12 col-sm-12 col-md-7 <?php echo $rtl; ?> "> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <?php while (have_posts()) { the_post();
<span class="number">(08) 3932 9777</span> </div> </div> </div> </div> </div><!--end topbar--> <?php if (!is_archive('product-category')) { ?> <div class="top-adv"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="slideshowHolder"> <?php echo adrotate_ad(11); ?> </div> <script type="text/javascript"> $(function () { // Slideshow 1 $(".a-single").responsiveSlides({ speed: 800 }); }); </script> </div> </div> </div> </div><!--end top-adv--> <?php
</figcaption> </figure> </div> <?php } ?> </div> <?php } ?> <div class="adv-details"> <?php echo adrotate_ad(10); ?> </div> </div> </div> </div> </section> <?php } ?> <script type="text/javascript"> jQuery(document).ready(function($){ var summaries = $('#sidebar'); summaries.each(function(i) {
function awaken_featured_posts() { $category = get_theme_mod('slider_category', ''); $slider_posts = new WP_Query(array('posts_per_page' => 5, 'cat' => $category)); ?> <div class="awaken-featured-container"> <div class="awaken-featured-slider"> <section class="slider"> <div class="flexslider"> <ul class="slides"> <?php while ($slider_posts->have_posts()) { $slider_posts->the_post(); ?> <li> <div class="awaken-slider-container"> <?php if (has_post_thumbnail()) { ?> <?php the_post_thumbnail('featured-slider'); ?> <?php } else { ?> <img src="<?php echo get_template_directory_uri() . '/images/slide.jpg'; ?> "> <?php } ?> <div class="awaken-slider-details-container"> <a href="<?php the_permalink(); ?> " rel="bookmark"><h1 class="awaken-slider-title"><?php the_title(); ?> </h1></a> </div> </div> </li> <?php } ?> </ul> </div> </section> </div><!-- .awaken-slider --> <div class="awaken-featured-posts"> <?php $fposts_category = get_theme_mod('featured_posts_category', ''); $fposts = new WP_Query(array('posts_per_page' => 2, 'cat' => $fposts_category, 'ignore_sticky_posts' => 1)); while ($fposts->have_posts()) { $fposts->the_post(); ?> <div class="afp"> <figure class="afp-thumbnail"> <?php if (has_post_thumbnail()) { ?> <a href="<?php the_permalink(); ?> " title="<?php the_title(); ?> "><?php the_post_thumbnail('featured', array('title' => get_the_title())); ?> </a> <?php } else { ?> <a href="<?php the_permalink(); ?> " rel="bookmark" title="<?php the_title(); ?> "><img src="<?php echo get_template_directory_uri(); ?> /images/featured.jpg" alt="<?php the_title(); ?> " /></a> <?php } ?> </figure> <div class="afp-title"> <a href="<?php the_permalink(); ?> " rel="bookmark"><?php the_title(); ?> </a> </div> </div> <!--QuangTrang <div class="afp"> <figure class="afp-thumbnail"> <?php echo adrotate_ad(2); ?> </figure> </div> QuangTrangEnd--> <?php } ?> </div> </div> <?php }
/** * Front-end display of widget. * * @see WP_Widget::widget() * * @param array $args Widget arguments. * @param array $instance Saved values from database. */ public function widget($args, $instance) { extract($args); $title = !empty($instance['title']) ? $instance['title'] : ''; $img_url = !empty($instance['img_url']) ? $instance['img_url'] : ''; $dest_url = !empty($instance['dest_url']) ? $instance['dest_url'] : ''; echo $before_widget; if (!empty($title)) { echo $before_title . $title . $after_title; } ?> <div class="awaken-medium-rectangle-widget"> <figure> <!-- <a href="<?php echo $dest_url; ?> "><img src="<?php echo $img_url; ?> "></a> --> <!--QuangTrang--> <?php echo adrotate_ad(3); ?> <!--QuangTrangEnd--> </figure> </div> <?php echo $after_widget; }