Files
vij/rsscreate.php

39 lines
733 B
PHP
Raw Normal View History

2021-10-11 22:29:11 +03:00
<?php
include_once '/vhosts/beta/wp-load.php';
2021-12-28 21:37:04 +03:00
function filterHtml($html) {
$html = trim($html);
$html = preg_replace('/(\>)\s*(\<)/m', '$1$2', $html);
return preg_replace('/<!--(.*?)-->/', '', $html);
}
2021-10-11 22:29:11 +03:00
date_default_timezone_set('Europe/Moscow');
$posts = get_posts( array(
2021-12-28 21:37:04 +03:00
'numberposts' => 25,
2021-10-11 22:29:11 +03:00
'category' => 2,
'orderby' => 'date',
'order' => 'DESC',
'include' => array(),
'exclude' => array(),
'meta_key' => '',
'meta_value' =>'',
'post_type' => 'post',
'suppress_filters' => true, // подавление работы фильтров изменения SQL запроса
));
if( $posts ){
include('views/rss/yanews.php');
}