public function requested() { if (!isset($this->slugs[ShoppPages::request()])) { return false; } $pagename = $this->slugs[ShoppPages::request()]; return $this->get($pagename); }
/** * Filters WP template handlers to render Shopp Storefront page templates * * @author Jonathan Davis * @since 1.2 * @version 1.2.1 * * @param string $template The template * @return string The output of the templates **/ public function pages($template) { // Catch smart collection pages if (is_shopp_collection()) { return $this->collections($template); } // Get the requested storefront page identifier from the slug $page = ShoppPages::request(); if (empty($page)) { return $template; } // Load the request Storefront page settings $Page = ShoppPages()->slugpage($page); if (!$Page) { return $template; } if (Shopp::maintenance()) { $Page = new ShoppMaintenancePage(); } $Page->poststub(); // Send the template back to WordPress return locate_template($Page->templates()); }
/** * The ShoppPages controller instance * * @since 1.3 * * @return ShoppPages The running ShoppPages controller **/ function ShoppPages() { return ShoppPages::object(); }