{"id":210,"date":"2008-11-01T22:38:22","date_gmt":"2008-11-01T14:38:22","guid":{"rendered":"http:\/\/lesterchan.net\/wordpress\/?p=210"},"modified":"2008-11-13T20:17:30","modified_gmt":"2008-11-13T12:17:30","slug":"my-plugins-and-wordpress-27","status":"publish","type":"post","link":"https:\/\/lesterchan.net\/wordpress\/2008\/11\/01\/my-plugins-and-wordpress-27\/","title":{"rendered":"My Plugins And WordPress 2.7"},"content":{"rendered":"<p>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 <strong>EXCEPT<\/strong> 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.<\/p>\n<p>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.<\/p>\n<p>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 <strong>ONLY<\/strong>.<\/p>\n<p><strong>Here is the fix for WP-Email 2.31:<\/strong><\/p>\n<blockquote><p>\nIn wp-email.php:<\/p>\n<p>Find (Line 106, Line 120, Line 134 &#038; Line 147):<\/p>\n<pre lang=\"php\" line=\"1\">\r\n$rewrite_rules = array_slice($rewrite_rules, 4, 1);\r\n<\/pre>\n<p>Replace:<\/p>\n<pre lang=\"php\" line=\"1\">\r\n$rewrite_rules = array_slice($rewrite_rules, 5, 1);\r\n<\/pre>\n<p>Find (Line 758):<\/p>\n<pre lang=\"php\" line=\"1\">\r\nadd_action('template_redirect', 'wp_email');\r\n<\/pre>\n<p>Replace:<\/p>\n<pre lang=\"php\" line=\"1\">\r\nadd_action('template_redirect', 'wp_email', 5);\r\n<\/pre>\n<\/blockquote>\n<p>Alternatively you can download the fixed wp-email.php:<\/p>\n\n<p><strong>Here is the fix for WP-Print 2.31:<\/strong><\/p>\n<blockquote><p>\nIn wp-print.php:<\/p>\n<p>Find (Line 79 &#038; Line 95):<\/p>\n<pre lang=\"php\" line=\"1\">\r\n$rewrite_rules = array_slice($rewrite_rules, 4, 1);\r\n<\/pre>\n<p>Replace:<\/p>\n<pre lang=\"php\" line=\"1\">\r\n$rewrite_rules = array_slice($rewrite_rules, 5, 1);\r\n<\/pre>\n<p>Find (Line 395):<\/p>\n<pre lang=\"php\" line=\"1\">\r\nadd_action('template_redirect', 'wp_print');\r\n<\/pre>\n<p>Replace:<\/p>\n<pre lang=\"php\" line=\"1\">\r\nadd_action('template_redirect', 'wp_print', 5);\r\n<\/pre>\n<\/blockquote>\n<p>Alternatively you can download the fixed wp-print.php:<\/p>\n\n<p>After uploading the fix, you need to regenerate permalink. Go to (<strong>WP-Admin -> Settings -> Permalinks -> Save Changes<\/strong>)<\/p>\n<p>I have already committed these changes to WP-Email 2.40 and WP-Print 2.40 to the SVN.<\/p>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &hellip; <a href=\"https:\/\/lesterchan.net\/wordpress\/2008\/11\/01\/my-plugins-and-wordpress-27\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;My Plugins And WordPress 2.7&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,1,19,6,11],"tags":[94,101],"class_list":["post-210","post","type-post","status-publish","format-standard","hentry","category-plugins","category-site","category-wordpress","category-wp-email","category-wp-print","tag-94","tag-fixes"],"views":26822,"_links":{"self":[{"href":"https:\/\/lesterchan.net\/wordpress\/wp-json\/wp\/v2\/posts\/210","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lesterchan.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lesterchan.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lesterchan.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lesterchan.net\/wordpress\/wp-json\/wp\/v2\/comments?post=210"}],"version-history":[{"count":0,"href":"https:\/\/lesterchan.net\/wordpress\/wp-json\/wp\/v2\/posts\/210\/revisions"}],"wp:attachment":[{"href":"https:\/\/lesterchan.net\/wordpress\/wp-json\/wp\/v2\/media?parent=210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lesterchan.net\/wordpress\/wp-json\/wp\/v2\/categories?post=210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lesterchan.net\/wordpress\/wp-json\/wp\/v2\/tags?post=210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}