From e6bdcd163c592409674f71538e8a1fe7b0cb979b Mon Sep 17 00:00:00 2001 From: Jeremy Simkins Date: Thu, 26 Mar 2015 19:06:19 -0400 Subject: [PATCH] Added htaccess rewrite hook and incremented version --- drupal2wp/drupal2wp.php | 2 +- drupal2wp/inc/Drupal2WordPressDrupalVersionAdapter.php | 2 ++ drupal2wp/readme.txt | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drupal2wp/drupal2wp.php b/drupal2wp/drupal2wp.php index 054ac04..e1a50a1 100644 --- a/drupal2wp/drupal2wp.php +++ b/drupal2wp/drupal2wp.php @@ -2,7 +2,7 @@ /** * Plugin Name: Drupal 2 WordPress * Description: Allows for importing a Drupal installation into WordPress - * Version: 1.3 + * Version: 1.4 * Author: Jeremy Simkins * Author URI: http://jeremysimkins.com * Text Domain: drupal2wp diff --git a/drupal2wp/inc/Drupal2WordPressDrupalVersionAdapter.php b/drupal2wp/inc/Drupal2WordPressDrupalVersionAdapter.php index 1502b49..b8b5524 100644 --- a/drupal2wp/inc/Drupal2WordPressDrupalVersionAdapter.php +++ b/drupal2wp/inc/Drupal2WordPressDrupalVersionAdapter.php @@ -556,6 +556,8 @@ public function complete() { * Shows the .htaccess edits for rewrite rules */ public function outputHtaccessRedirects() { + // Combine htaccess rewrites + $this->_htaccessRewriteRules = apply_filters('drupal2wp_htaccess_rewrite_rules', $this->_htaccessRewriteRules); if (!empty($this->_htaccessRewriteRules)) { echo '
'; echo '

'.sprintf( __('Add this to your .htaccess file to have proper 301 redirects (%d total)', 'drupal2wp'), count($this->_htaccessRewriteRules)).'

'; diff --git a/drupal2wp/readme.txt b/drupal2wp/readme.txt index a2fb33a..34f1da0 100644 --- a/drupal2wp/readme.txt +++ b/drupal2wp/readme.txt @@ -33,6 +33,12 @@ directory take precedence. For example, `/assets/screenshot-1.png` would win ove = 1.0 = * Initial Plugin += 1.4 = +* Fixed missing comment join for comment data +* Improved user import for large set of users +* Removed old code +* Optimized hook placements +* Added `drupal2wp_errors` and `drupal2wp_htaccess_rewrite_rules` filters to append to these with plugins == Hooks List == @@ -45,6 +51,8 @@ More will be added to improve custom installations * drupal2wp_drupal_terms - modify Drupal terms * drupal2wp_modify_post_type - modify post_type (1 arg - $post) * drupal2wp_modify_post - modify post array (1 arg - $post) +* drupal2wp_errors - Add errors to the complete page (1 arg - $errors) append to array and return array +* drupal2wp_htaccess_rewrite_rules - Add rewrite rules to the complete page (1 arg - $rewrites) append to array and return array *Importer Hooks* * Initialization