What is the best practice to check for pretty permalinks?


I develop a plugin and therefore I add new RSS feeds. One feed might look like http://local.wordpress.dev/?post_type=custom-post-type&custom-taxonomy=tax-1&feed=custom-feed

This works pretty good. But if pretty permalinks are enabled also this url works which will be redirect to the same feed http://local.wordpress.dev/custom-taxonomy/tax-1/feed/custom-feed.

So far so good. My plugin will list all available feeds for the user. My question what is the best practice to check if pretty permalinks are active and which url version should be displayed?

My idea is to look at $wp_rewrite which permalink_structure is set and decide which version to show. Is there a better way to do it?

, obstschale 10 years 2014-05-19T12:01:13-05:00 0 Answers 65 views 0

Leave an answer