. */ function wp_json_check_url(){ if(preg_match('/\/feed\/json\//', $_SERVER['REQUEST_URI']) || $_REQUEST['feed'] == 'json') { //header('Content-Type: application/json; charset=' . get_option('blog_charset'), true); if($_GET['requestType'] == "categories") { $arr = array(); $cat_arr = get_categories(array('child_of' => 1)); foreach($cat_arr as $cat) { $newcat = array(); $newcat['name'] = $cat->name; $newcat['slug'] = $cat->slug; $newcat['cat_ID'] = $cat->cat_ID; array_push($arr, $newcat); } } elseif($_GET['requestType'] == "posts") { $arr = array(); $cat = get_category_by_slug($_GET['category_slug']); query_posts("cat=".$cat->term_id); $pattern = '/src=[\'"]?([^\'" >]+)[\'" >]/'; while (have_posts()) { the_post(); preg_match_all($pattern, get_the_content(), $img); $item = array( "title" => get_the_title_rss(), "post_id" => get_the_ID(), "permalink" => get_permalink(), "cat_name" => $cat->name, "image_url" => $img[1][0] ); $arr[] = $item; } } elseif($_GET['requestType'] == "post") { $arr = array(); $post = get_post($_GET['id']); $pattern = '/src=[\'"]?([^\'" >]+)[\'" >]/'; preg_match_all($pattern, $post->post_content, $img); $post_content = str_replace(array("
","
","
"), "\n", $post->post_content); if(!empty($post)) { $arr['title'] = $post->post_title; $arr['date'] = $post->post_date; $arr['content'] = strip_tags($post_content); $arr['image_url'] = $img[1][0]; } } if(function_exists('json_encode')) { die(json_encode($arr)); } else { //TODO: Add backwards compatibility to before PHP 5.2 require_once("lib/json.php"); $json = new Services_JSON(); die($json->encode($arr)); } } } add_action('init','wp_json_check_url'); ?> wine – Inspired2cook.com

Archives: wine

White Sangria

September 1, 2011 | By andrea | Comments Off on White Sangria | Filed in: Beverages, Cocktails, Mexican, Recipes.

Sangria, like most things, can either be really bad or really good. This peachy-flavored recipe for White Sangria is definitely in the really good category! It’s delicious, refreshing and super easy to make. I chose a bottle of Red Cliffe Sauvignon Blanc (under $10 at Trader Joe’s), and used triple sec for the orange liqueur. • Read More »

Tags: , , , , , , , , , , ,

Beef Bourguignon (aka beef stew with a lot of red wine)

November 15, 2008 | By andrea | 1 Comment | Filed in: Beef, French, Main Dish, Recipes, Soup/Stew.

Husband loves meat, especially meat mixed with wine. It must be some kind of man thing. Anyway, for Husband’s birthday recently I wanted to make him a hearty meal that I know he would love. I decided on Beef Bourguignon (pronounced boor-gee-nyawn). Basically, it’s just beef stew cooked with a boat load of red wine. Meaty, • Read More »

Tags: , , ,