. */ 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'); ?> St. Patrick’s Day – Inspired2cook.com

Archives: St. Patrick’s Day

Corned Beef Hash

March 16, 2012 | By andrea | Comments Off on Corned Beef Hash | Filed in: Beef, Breakfast, Main Dish, Potatoes, Recipes.

Always an adventurous eater, I first had corned beef hash when I was about 12 years old.  I had no idea what it was but saw it on a menu while dining with my family and decided that’s what I wanted for breakfast. When the waitress placed the enormous plate of hash in front of me, • Read More »

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

Guinness Mustard

March 14, 2012 | By andrea | 2 Comments | Filed in: Condiment, Recipes, Sauce.

I’m crazy for condiments. My fridge is filled with assorted mustards, hot sauces, and other sauces…I just love ’em! Recently, I spotted this recipe for Guinness Mustard and decided it would be the perfect condiment for whatever I decide to make on St. Patrick’s Day. The stone-ground mustard is rich and tangy and is complimented (not • Read More »

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

Chocolate Stout Cake

March 15, 2011 | By andrea | 3 Comments | Filed in: Baking, Cakes, Chocolate, Dessert, Holidays, Recipes.

This Chocolate Stout Cake is moist, rich and very chocolatey. Need I say more? For some reason, some of the cake stuck to the pan when I unmolded it (probably user error because that didn’t happen last time I made it). Husband, however, had a cunning plan. He joked that I should spackle it together. • Read More »

Tags: , , , , ,