Browse files

Bugfix / If you're having FWP rewrite the permalinks for syndicated p…

…osts, the setting should stick when you're syndicating to a custom post type, as well. Props to David M. and joethepro on WordPress.org plugin support forums.
  • Loading branch information...
1 parent 5a2b04b commit 04b4fc5b6ecaead11fac813cfa36ff4b2000f91a Charles Johnson committed Dec 16, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 feedwordpress.php
View
5 feedwordpress.php
@@ -164,7 +164,8 @@
# Filter in original permalinks if the user wants that
add_filter('post_link', 'syndication_permalink', /*priority=*/ 1, /*arguments=*/ 3);
-
+ add_filter('post_type_link', 'syndication_permalink', /*priority=*/ 1, /*arguments=*/ 4);
+
# When foreign URLs are used for permalinks in feeds or display
# contexts, they need to be escaped properly.
add_filter('the_permalink', 'syndication_permalink_escaped');
@@ -527,7 +528,7 @@ function feedwordpress_item_feed_data () {
* @global $id
* @global $feedwordpress_the_original_permalink
*/
-function syndication_permalink ($permalink = '', $post = null, $leavename = false) {
+function syndication_permalink ($permalink = '', $post = null, $leavename = false, $sample = false) {
global $id;
global $feedwordpress_the_original_permalink;

0 comments on commit 04b4fc5

Please sign in to comment.