File "breaking.php"
Full Path: /home/ozbarhaber/public_html/19052025___siteeee/wp-content/themes/anka/parts/breaking.php
File size: 1.73 KB
MIME-type: text/x-php
Charset: utf-8
<?php if(!defined('ABSPATH')) exit; ?>
<?php if( safirShowElement("showBreaking") ) : ?>
<div id="breakingGroup">
<div class="innerContainer visible pad">
<div class="breakingContainer">
<div id="breaking">
<div class="breakingTitle">
<?php themeIcon("clock") ?>
<div class="title">
<?php echo xoption("breakingTitle") ?>
</div>
<div class="arrows">
<span class="up"><?php themeIcon("chewleft") ?></span>
<span class="down"><?php themeIcon("chewright") ?></span>
</div>
</div>
<div class="items">
<?php
$code = get_transient( "sfrAnkaBreaking" );
if( $code === false ) {
ob_start();
$args = array(
'posts_per_page' => xoption('breakingNumber'),
'post_status' => 'publish',
'no_found_rows' => true,
'ignore_sticky_posts' => true,
'cat' => xoption("breakingCategory"),
);
$results = new WP_Query($args);
while( $results->have_posts() ) {
$results->the_post();
?>
<div class="post">
<a href="<?php the_permalink() ?>">
<?php if(xoption("breakingHour")) : ?>
<strong><?php the_time("H:i"); ?></strong>
<?php endif; ?>
<?php the_title() ?>
</a>
</div>
<?php
}
wp_reset_postdata();
$code = ob_get_contents();
ob_end_clean();
safir_set_transient( "sfrAnkaBreaking", $code, SAFIR_CACHE_TIME );
}
echo $code;
?>
</div>
<?php if($x = xoption("breakingMoreLink")) : ?>
<a href="<?php echo $x ?>" class="breakingMoreLink"><?php echo xoption("breakingMoreText") ?></a>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php endif; ?>