function nzshpcrt_products_page($content = '') { if (stristr($content, '[productspage]')) { $nzshpcrt = new wp_shopping_cart(); $GLOBALS['nzshpcrt_activateshpcrt'] = true; $output = $nzshpcrt->products_page(); if (function_exists('drag_and_drop_cart')) { add_action('wp_footer', 'drag_and_drop_cart'); } return preg_replace("/\\[productspage\\]/", $output, $content); } else { return $content; } }