query_vars['feed']=='news.yandex.ru') { /*выводим за последние 7 дней*/ function filter_where($where = '') { $today_date = get_the_date('Y-m-d'); //posts between publish date of wrap-up and 7 days prior $where .= " AND post_date >= '" . date('Y-m-d', strtotime('-7 days')) . "' AND post_date <= '" . date('Y-m-d', strtotime('+1 days')) . "'"; return $where; } add_filter('posts_where', 'filter_where'); load_template( NEWS_YANDEX_RU_PATH.'/template.php'); //exit; } } } function category($categoryId=false){ $full=false; $ret=''; if($ret!='') { $full=$ret; } if(!$categoryId) { $ret='
'.$ret.'
'; } return $ret; } function init() { $this->cfg=get_option('news_yandex_ru'); if(is_admin() && !empty($_POST['news_yandex_ru_update'])) { if(!empty($_POST['news_yandex_ru_category'])) { $this->cfg['category'] = $_POST['news_yandex_ru_category']; } else { $this->cfg['category']=array(); } if(!empty($_POST['news_yandex_ru'])) { if(!empty($_POST['news_yandex_ru']['url']) && trim($_POST['news_yandex_ru']['url'])!=$this->cfg['url']) { $this->cfg['url']=trim($_POST['news_yandex_ru']['url']); } elseif(empty($_POST['news_yandex_ru']['url'])) { $this->cfg['url']=''; } if(!empty($_POST['news_yandex_ru']['alt']) && trim($_POST['news_yandex_ru']['alt'])!=$this->cfg['alt']) { $this->cfg['alt']=trim($_POST['news_yandex_ru']['alt']); } elseif(empty($_POST['news_yandex_ru']['alt'])) { $this->cfg['alt']=''; } if(!empty($_POST['news_yandex_ru']['link']) && trim($_POST['news_yandex_ru']['link'])!=$this->cfg['link']) { $this->cfg['link']=trim($_POST['news_yandex_ru']['link']); } elseif(empty($_POST['news_yandex_ru']['link'])) { $this->cfg['link']=''; } if(!empty($_POST['news_yandex_ru']['count']) && trim($_POST['news_yandex_ru']['count'])!=$this->cfg['count']) { $this->cfg['count']=trim($_POST['news_yandex_ru']['count']); } elseif(empty($_POST['news_yandex_ru']['count'])) { $this->cfg['count']=0; } } update_option( 'news_yandex_ru', $this->cfg); $this->cfg=get_option('news_yandex_ru'); } } function activate() { $cfg=array( 'url'=>'', 'alt'=>get_bloginfo('name'), 'link'=>get_bloginfo('url'), 'category'=>array() ); add_option( 'news_yandex_ru', $cfg); } function deactivate() { delete_option('news_yandex_ru'); } function menu() { add_options_page('Параметры news.yandex.ru WordPress RSS2.0', 'news.yandex.ru', 10, __FILE__, array(&$this,'config')); } function config() { include "config.php"; } } $news_yandex_ru = new news_yandex_ru(); ?> https://autotheme.info/sitemap-posttype-post.2026.xml2026-01-10T15:05:43+03:00 https://autotheme.info/sitemap-posttype-post.2025.xml2025-12-21T16:19:17+03:00 https://autotheme.info/sitemap-posttype-post.2024.xml2025-02-18T16:41:30+03:00 https://autotheme.info/sitemap-posttype-post.2023.xml2025-09-08T16:17:13+03:00 https://autotheme.info/sitemap-posttype-post.2022.xml2024-03-30T17:24:33+03:00 https://autotheme.info/sitemap-posttype-post.2021.xml2025-04-05T11:58:01+03:00 https://autotheme.info/sitemap-posttype-post.2020.xml2023-04-20T18:54:54+03:00 https://autotheme.info/sitemap-posttype-post.2019.xml2023-04-20T19:00:26+03:00 https://autotheme.info/sitemap-posttype-post.2018.xml2019-02-04T01:22:32+03:00 https://autotheme.info/sitemap-posttype-post.2017.xml2023-04-29T22:38:02+03:00 https://autotheme.info/sitemap-posttype-post.2016.xml2019-04-21T19:32:10+03:00 https://autotheme.info/sitemap-posttype-post.2015.xml2019-07-11T21:06:44+03:00 https://autotheme.info/sitemap-posttype-post.2014.xml2017-05-24T22:46:46+03:00 https://autotheme.info/sitemap-posttype-post.2013.xml2018-09-21T19:04:22+03:00 https://autotheme.info/sitemap-posttype-post.2012.xml2017-06-10T14:33:08+03:00 https://autotheme.info/sitemap-posttype-post.2011.xml2017-04-21T17:04:39+03:00 https://autotheme.info/sitemap-posttype-post.2010.xml2017-04-21T17:08:33+03:00 https://autotheme.info/sitemap-posttype-page.xml2025-09-26T13:35:59+03:00 https://autotheme.info/sitemap-author.xml2026-01-10T15:05:43+03:00 https://autotheme.info/sitemap-news.xml2026-01-10T15:05:43+03:00