filter rss
This commit is contained in:
@@ -108,7 +108,7 @@
|
||||
</div><!-- end main -->
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
|
||||
<?if (LANG_VERSION == 'ru'):?>
|
||||
|
||||
@@ -139,11 +139,9 @@
|
||||
</div>
|
||||
<?endif?>
|
||||
|
||||
<?php include get_template_directory().'/blocks/mobile-subscript.php';?>
|
||||
<?php include get_template_directory().'/blocks/mobile-subscript.php';?>
|
||||
|
||||
|
||||
|
||||
<footer>
|
||||
|
||||
<div id="footer_menu">
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<title><?php wp_title('|', true, 'right');?><?=get_bloginfo('name')?></title>
|
||||
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=134">
|
||||
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=135">
|
||||
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
|
||||
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/jquery-3.6.0.min.js"></script>
|
||||
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/golos.js"></script>
|
||||
@@ -62,5 +62,4 @@
|
||||
<?endif?>
|
||||
<!--<div>Главное</div>-->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,10 +4,18 @@
|
||||
|
||||
include_once '/vhosts/beta/wp-load.php';
|
||||
|
||||
function filterHtml($html) {
|
||||
|
||||
$html = trim($html);
|
||||
$html = preg_replace('/(\>)\s*(\<)/m', '$1$2', $html);
|
||||
return preg_replace('/<!--(.*?)-->/', '', $html);
|
||||
|
||||
}
|
||||
|
||||
date_default_timezone_set('Europe/Moscow');
|
||||
|
||||
$posts = get_posts( array(
|
||||
'numberposts' => 20,
|
||||
'numberposts' => 25,
|
||||
'category' => 2,
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC',
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<?endif?>
|
||||
<pubDate><?=_U2RFC822($post->post_date)?></pubDate>
|
||||
<yandex:full-text><![CDATA[
|
||||
<?=trim($post->post_content)?>
|
||||
<?=filterHtml($post->post_content)?>
|
||||
]]>
|
||||
</yandex:full-text>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user