[wp-hackers] Verifying permalink structure

Thomas Scholz info at toscho.de
Mon Jan 14 20:27:04 UTC 2013

Lutz Schröer:

> If I update the permalink structure with a "Custom Structure" the input  
> is not verified in any way. If the user has a typo in a tag the  
> permalink structure is accepted but does not work afterwards.
> Additionally the permalink tags are case sensitive, e.g. %pagE% does not  
> work.
> Wouldn't it be better if the tags would be verified and converted to  
> lower case?

You could do that for the built-in tags, but you can register custom tags  
too, and verifying those would be difficult.

In <https://github.com/toscho/t5-rewrite> I provide a placeholder  
%_custom_%(fieldname)", eg. "/%_custom_%(gender)". I will solve the  
problem you described in one of the following versions with a live preview.

Has to wait until I’m ready to convert the current, rather noisy template  
list into a <datalist>.

It has the advantage to provide feedback immediately, and I don’t risk  
side effects as a result of overly greedy validation. When a user wants to  
break the permalinks – be it so. :)


More information about the wp-hackers mailing list