Skip to content

Commit

Permalink
Added htaccess rewrite hook and incremented version
Browse files Browse the repository at this point in the history
  • Loading branch information
jpSimkins committed Mar 26, 2015
1 parent 372fa8a commit e6bdcd1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drupal2wp/drupal2wp.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
* Author URI: http://jeremysimkins.com
* Text Domain: drupal2wp
Expand Down
2 changes: 2 additions & 0 deletions drupal2wp/inc/Drupal2WordPressDrupalVersionAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<hr/>';
echo '<h3>'.sprintf( __('Add this to your .htaccess file to have proper 301 redirects (%d total)', 'drupal2wp'), count($this->_htaccessRewriteRules)).'</h3>';
Expand Down
8 changes: 8 additions & 0 deletions drupal2wp/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ==

Expand All @@ -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
Expand Down

0 comments on commit e6bdcd1

Please sign in to comment.