filter rss

This commit is contained in:
2021-12-28 21:37:04 +03:00
parent 38e04b4d94
commit 5b279f70e6
4 changed files with 14 additions and 9 deletions

View File

@@ -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',