コード例 #1
0
ファイル: Pages.php プロジェクト: jonathandavis/shopp
 public function requested()
 {
     if (!isset($this->slugs[ShoppPages::request()])) {
         return false;
     }
     $pagename = $this->slugs[ShoppPages::request()];
     return $this->get($pagename);
 }
コード例 #2
0
 /**
  * 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());
 }
コード例 #3
0
ファイル: core.php プロジェクト: BlessySoftwares/anvelocom
/**
 * The ShoppPages controller instance
 *
 * @since 1.3
 *
 * @return ShoppPages The running ShoppPages controller
 **/
function ShoppPages()
{
    return ShoppPages::object();
}