Closed Pypeline closed 11 years ago
let me just add this example so you can see how bad it can get. check out this RSS feed and do a Find for "custom-sidebar" http://blogs.kidshopeusa.org/?feed=rss
Poor blog has all kinds of permalinks with "custom-sidebar" in it. Please address soon.
This issue has been addressed in the 2.7.2 branch (f1e5e68f91b288135ce714ca734439e1e377e032) and should be merged to trunk in the next week. cc: @brichards
Ah, true that, thanks for pointing it out. It does not address the issue of creating multiple sidebars with the same slug of "custom-sidebar" though as my snippet above does.
Thanks for the heads up @Pypeline!
I was going to put in a pull request for it but my current one is still open. This checks for the sidebar post type (I've had other CPT of mine end up with 'custom-sidebar' as their slug) and also adds the ID onto the end of the "custom-sidebar" default slug.
at line 70 in /includes/extensions/sidebars.php
// Make sure this isn't an unsaved post (auto-draft) and is a custon sidebar post if ( 'auto-draft' != $postarr['post_status'] && 'sidebar' == $data['post_type'] && '' == $data['post_name'] ) { $data['post_name'] = 'custom-sidebar-'.$postarr['ID']; }