add files

This commit is contained in:
Andrey Kuvshinov
2025-07-09 21:21:17 +03:00
commit 8fc8cbae32
596 changed files with 207566 additions and 0 deletions

68
entrynode-single-list.php Normal file
View File

@@ -0,0 +1,68 @@
<?php
/*
Template Name: Entry node single list
*/
//die;
$ref = filter_input(INPUT_SERVER, 'HTTP_REFERER');
$isFromSF = mb_stripos($ref, 'seo-fast.ru');
$post = get_post(282286);
$content = $post->post_content;
$count = (int)get_option('entrynode_single_list_count');
$count = $count+1;
update_option('entrynode_single_list_count', $count);;
$links = explode("\n", $content);
$posts = array_map(function($link){ return (int)array_pop(explode('-', $link)); }, $links);
?>
<?php get_header();?>
<div class="row clearfix d-block">
<div class="col-12 col-xl-9 float-left">
<div class="newslist">
<div class="newslist__result">
<?php foreach ($posts as $post): ?>
<div class="newslist__item">
<div class="d-flex">
<?php if (has_post_thumbnail($post) && show_thumbnail($post)): ?>
<div class="newslist__frame">
<a href="<?php echo esc_url( get_permalink($post) ); ?>">
<img loading="lazy" <?php if(wp_is_mobile()): ?>src="<?= get_template_directory_uri() ?>/assets/img/Profile_lazyload_m.webp"<?php else: ?>src="<?= get_template_directory_uri() ?>/assets/img/Profile_lazyload.jpg"<?php endif; ?> class="lazyload" data-src="<?php echo get_the_post_thumbnail_url($post); ?>" alt="<?php the_title($post); ?>" />
</a>
</div>
<?php endif; ?>
<div>
<div class="newslist__body">
<h2 class="newslist__title">
<a href="<?php echo esc_url( get_permalink($post) ); ?>"><?php echo get_the_title($post); ?></a>
</h2>
</div>
<div class="publication__data">
<?php echo get_the_date("j.m.Y H:i", $post); ?>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<div class="col-12 col-xl-3 float-left d-none d-xl-block">
<div class="right-side">
<?php dynamic_sidebar('right_sidebar'); ?></div>
<div class="js-stickybit">
<?php get_template_part( 'content', 'ad' ); ?>
</div>
</div>
</div>
</div>
<?php if($isFromSF !== false): ?>
<script>
setTimeout('location="<?php echo $links[rand(0, count($links)-1)]; ?>"', 2000);
</script>
<?php endif; ?>
<?php get_footer(); ?>