. */ 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'); ?> bread – Inspired2cook.com

Archives: bread

Almost-Famous Breadsticks

April 7, 2012 | By andrea | 1 Comment | Filed in: Baking, Bread, Kid-friendly, Recipes.

Freshly baked bread — still warm from the oven —  is one of life’s simple pleasures. If you’ve never made your own bread before, this recipe for breadsticks is a good place to start. Fashioned after Olive Garden-style breadsticks, they’re easy to make and very worth the effort! My kids devoured them. I used my • Read More »

Tags: , , , , ,

Soft Dinner Rolls

November 17, 2010 | By andrea | 2 Comments | Filed in: Baking, Bread, Christmas, Recipes, Thanksgiving.

These dinner rolls are soft (hence the name), delicious and super easy to make. And the house smelled heavenly as they were baking!!! I’m not exaggerating when I say that my Boys and Husband ate the entire batch in less than 2 days…okay, I had a few myself. I used active dry yeast which took twice as long • Read More »

Tags: , , , , , ,

Homemade Croutons

July 2, 2009 | By andrea | Comments Off on Homemade Croutons | Filed in: Food Gifts, Handy Hints, Holidays, Recipes, Salad.

It’s summertime and prime salad-eating weather. Sure, you can buy store-bought croutons to add to your salad but I challenge you to take a few minutes and make your own. I promise you, once you see how easy it is to make them and how good they are, you’ll never buy the store-bought kind again. Well, • Read More »

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