function nzshpcrt_shopping_cart($content = '') { $output = null; if (preg_match("/\\[shoppingcart\\]/", $content)) { $nzshpcrt = new wp_shopping_cart(); $output = $nzshpcrt->shopping_cart(); } return preg_replace("/\\[shoppingcart\\]/", $output, $content); }