My Plugins And WordPress 2.7

I tested both 1.31/2.31 version as well as 1.40/2.40 version of my plugins and they appear to work fine in WordPress 2.7 EXCEPT for WP-Email and WP-Print. It is because for some reasons the canonical redirect happens before my template redirect and hence /email/ will always be an invalid page in WordPress eyes. This issue is not present in WordPress 2.6.

My efforts had paid off when my plugins undergo major cosmetic changes back in WordPress 2.5 to accommodate the new WordPress 2.5 design. It is because for WordPress 2.7, I need not do anything and the design just fits right in. I just need to add in the icon for the admin menu for WP-DBManager, WP-DownloadManager, WP-Email, WP-Polls and WP-PostRatings.

Here are the fixes to get WP-Email 2.31 and WP-Print 2.31 to work with WordPress 2.7. I will not update WP-Email 2.31 and WP-Print 2.31 with this fix, instead I will just leave the fix to be downloadeded on this site. Do note that the fix will make WP-Email and WP-Print work for WordPress 2.7 ONLY.

Here is the fix for WP-Email 2.31:

In wp-email.php:

Find (Line 106, Line 120, Line 134 & Line 147):

$rewrite_rules = array_slice($rewrite_rules, 4, 1);

Replace:

$rewrite_rules = array_slice($rewrite_rules, 5, 1);

Find (Line 758):

add_action('template_redirect', 'wp_email');

Replace:

add_action('template_redirect', 'wp_email', 5);

Alternatively you can download the fixed wp-email.php:

Here is the fix for WP-Print 2.31:

In wp-print.php:

Find (Line 79 & Line 95):

$rewrite_rules = array_slice($rewrite_rules, 4, 1);

Replace:

$rewrite_rules = array_slice($rewrite_rules, 5, 1);

Find (Line 395):

add_action('template_redirect', 'wp_print');

Replace:

add_action('template_redirect', 'wp_print', 5);

Alternatively you can download the fixed wp-print.php:

After uploading the fix, you need to regenerate permalink. Go to (WP-Admin -> Settings -> Permalinks -> Save Changes)

I have already committed these changes to WP-Email 2.40 and WP-Print 2.40 to the SVN.

Tentatively WP-DBManager, WP-DownloadManager, WP-Email, WP-Polls and WP-PostRatings will work for WordPress 2.7 only because of the new icon in the admin menu.

1 Star2 Stars3 Stars4 Stars5 Stars (49 votes, average: 4.24 out of 5)