/**
  * Returns the blog route selected in the Magento config
  *
  * @return string|null
  */
 public function getBlogRoute()
 {
     if ($this->isFullyIntegrated()) {
         if (!$this->_isCached('blog_route')) {
             $transport = new Varien_Object(array('blog_route' => trim(strtolower($this->getConfigValue('wordpress/integration/route')), '/')));
             Mage::dispatchEvent('wordpress_get_blog_route', array('transport' => $transport));
             $this->_cache('blog_route', $transport->getBlogRoute());
         }
         return $this->_cached('blog_route');
     }
     return null;
 }
Example #2
0
 /**
  * Returns the blog route selected in the Magento config
  *
  * @return string|null
  */
 public function getBlogRoute()
 {
     if ($this->isFullyIntegrated()) {
         if (!$this->_isCached('blog_route')) {
             $actual_link = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
             //Load a different route for the pen2paper blog, and the route assigned to the store otherwise...
             $blogRoute = strpos($actual_link, "pensdev.logopens.co.uk/pen2paper") ? "pen2paper" : strtolower(Mage::getStoreConfig('wordpress/integration/route'));
             $transport = new Varien_Object(array('blog_route' => trim($blogRoute, '/')));
             Mage::dispatchEvent('wordpress_get_blog_route', array('transport' => $transport));
             $this->_cache('blog_route', $transport->getBlogRoute());
         }
         return $this->_cached('blog_route');
     }
     return null;
 }