/**
  * Recommend installing Google XML Sitemap
  *
  * @return $this
  */
 protected function _recommendGoogleXmlSitemap()
 {
     if (!Mage::helper('wordpress')->isPluginEnabled('google-sitemap-generator')) {
         if (!Mage::helper('wordpress')->isAddonInstalled('Multisite')) {
             throw Fishpig_Wordpress_Exception::warning('Google Sitemap', $this->__('Install the <a href="%s" target="_blank">Google XML Sitemaps</a> plugin to generate an XML sitemap for your blog.', 'http://wordpress.org/plugins/google-sitemap-generator/'));
         }
     }
     return $this;
 }
Пример #2
0
 /**
  * Ensure the .htaccess file exists and doesn't reference the blog route
  *
  * @return $this
  */
 protected function _validateHtaccess()
 {
     if (($path = Mage::helper('wordpress')->getWordPressPath()) !== false) {
         $file = rtrim($path, DS) . DS . '.htaccess';
         if (!is_file($file)) {
             throw Fishpig_Wordpress_Exception::warning('.htaccess', 'You do not have a WordPress .htaccess file.');
         }
         if (is_readable($file) && ($data = @file_get_contents($file))) {
             $blogRoute = Mage::helper('wordpress')->getBlogRoute();
             if (preg_match('/\\nRewriteBase \\/' . preg_quote($blogRoute, '/') . '\\//i', $data)) {
                 throw Fishpig_Wordpress_Exception::warning('.htaccess', 'Your .htaccess file references your blog route but should reference your WordPress installation directory.');
             }
         }
     }
     return $this;
 }
Пример #3
0
 /**
  * Ensure Magento 1.7 is being used
  *
  * @return void
  */
 protected function _validateMagentoVersion()
 {
     if (!$this->hasValidCurlMethods()) {
         throw Fishpig_Wordpress_Exception::warning('Update Now', $this->__('Update Magento to version 1.7.0.0 to use the Auto-Login feature.'));
     }
 }