File "papers.php"

Full Path: /home/ozbarhaber/public_html/wp-content/themes/anka/widgets/papers.php
File size: 1.17 KB
MIME-type: text/x-php
Charset: utf-8

<?php if(!defined('ABSPATH')) exit; ?>
<div class="papersWidget owlWidget safirWidget <?php echo "$color $widgetPlace"; ?>Widget">
	<?php include("parts/_heading.php"); ?>
	<div class="innerContainer">
		<div class="widgetContent">
		<div class="items">
			<div class="owl-carousel">
				<?php
				global $safirPapers;
				$papers = xoption("papers");
				$papersPage = get_transient("sfr_papersPage");
				if(!is_array($papers)) $papers = array();
				foreach ($papers as $paper) {
					if(!in_array($paper, array_keys((array)$safirPapers))) continue;
					$image = $safirPapers->$paper->thumb;
					if (get_option('permalink_structure') != '') {
						$link = user_trailingslashit( get_page_link($papersPage["id"]) . $paper );
					} else {
						$link = add_query_arg( 'gazete', $paper, get_page_link($papersPage["id"]) );
					}				
					?>
					<div class="item">
						<a href="<?php echo $link ?>" title="<?php echo $safirPapers->$paper->name ?>">
							<img <?php safirLazyThumb($image) ?> width="180" height="270" alt="<?php echo $safirPapers->$paper->name ?>">
						</a>
					</div>
					<?php
				}

				?>
			</div>
		</div>
	</div>
	</div>
</div>