/** * Ensure the L10n file is writable if using add-on extensions that use Core * * @return $this **/ protected function _validateL10nPermissions() { if (($path = Mage::helper('wordpress')->getWordPressPath()) !== false) { $file = $path . 'wp-includes' . DS . 'l10n.php'; if (Mage::getConfig()->getNode('wordpress/core/modules')) { if (is_file($file) && !is_writable($file)) { throw Fishpig_Wordpress_Exception::error('Permissions', 'The following file must be writable: ' . $file); } } } return $this; }
/** * Determine whether the WordPress path is valid * * @return void */ protected function _validatePath() { if (Mage::helper('wordpress')->getWordPressPath() === false) { throw Fishpig_Wordpress_Exception::error('WordPress ' . $this->__('Path'), $this->__("Unable to find a WordPress installation at '%s'", Mage::helper('wordpress')->getRawWordPressPath())); } return true; }
/** * Ensure the latest version is being used * * @return void */ protected function _validateCurrentVersion() { if ($this->hasValidCurlMethods()) { throw Fishpig_Wordpress_Exception::error('Update Now', $this->__('Update to version %s', '<span id="wp-version"></span>') . "<script type=\"text/javascript\">try { \$('wp-version').up('tr').hide(); } catch(e) {}</script>"); } }