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(); ?> Ukrainian Peugeot Club » Vitalik_K https://peugeot-club.in.ua Sat, 07 Jun 2014 11:36:01 +0000 ru-RU hourly 1 Как стать обладателем Хонды, без шума и пыли :) https://peugeot-club.in.ua/blogi/zhitejskoe/kak-stat-obladatelem-hondy-bez-shuma-i-py-li.html https://peugeot-club.in.ua/blogi/zhitejskoe/kak-stat-obladatelem-hondy-bez-shuma-i-py-li.html#comments Sat, 18 May 2013 17:48:09 +0000 Vitalik_K https://peugeot-club.in.ua/?p=2447 https://peugeot-club.in.ua/blogi/zhitejskoe/kak-stat-obladatelem-hondy-bez-shuma-i-py-li.html/feed 13 Крутая реклама https://peugeot-club.in.ua/news/krutaya-reklama.html https://peugeot-club.in.ua/news/krutaya-reklama.html#comments Tue, 22 Jan 2013 09:26:06 +0000 Vitalik_K https://peugeot-club.in.ua/?p=1632 https://peugeot-club.in.ua/news/krutaya-reklama.html/feed 2 Изготовление мебели. Полка для обуви, с «сидушкой» https://peugeot-club.in.ua/blogi/ochumely-e-ruchki/izgotovlenie-mebeli-polka-dlya-obuvi-s-sidushkoj.html https://peugeot-club.in.ua/blogi/ochumely-e-ruchki/izgotovlenie-mebeli-polka-dlya-obuvi-s-sidushkoj.html#comments Thu, 04 Oct 2012 11:25:37 +0000 Vitalik_K https://peugeot-club.in.ua/?p=330 https://peugeot-club.in.ua/blogi/ochumely-e-ruchki/izgotovlenie-mebeli-polka-dlya-obuvi-s-sidushkoj.html/feed 8