Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3974 closed enhancement (invalid)

Filtering titles to sanitize

Reported by: harkos Owned by: harkos
Milestone: Priority: normal
Severity: normal Version: 2.1.2
Component: Optimization Keywords:
Focuses: Cc:


I recently started developing a plugin for multilanguage support based on others that I have found. Both plugins I analyzed where unable to work on post titles for slugs because they didn't know how. Hacking through WP, I found the work could be done easily if we had another filter, which I added perfectly on my own.

It was a small change and not a trouble at all which I would like to share with everyone. So, according to the rules set, a svn patch file is attached to this ticket. Hope it comes in help for more people.

Attachments (2)

formatting_php.patch (392 bytes) - added by harkos 13 years ago.
Patch to sanitize_title()
default-filters_php.patch (4.4 KB) - added by harkos 13 years ago.
Patch to trim() getting more arguments

Download all attachments as: .zip

Change History (6)

13 years ago

Patch to sanitize_title()

#1 @harkos
13 years ago

  • Owner changed from anonymous to harkos
  • Status changed from new to assigned

Just noticed the post isn't accessible with the patch I submitted. I think I'll need some more work, but the uploaded file is part of the solution.

#2 @harkos
13 years ago

Found the problem. I have also applied the patch I proposed to #3975 and that passed a new parameter to trim() from default filters, who was trying to convert the post object to string (unsuccessfully, of course). So, I created a small function just to patch this problem. I'm not sure if this applies to other filters as well.

13 years ago

Patch to trim() getting more arguments

#3 @harkos
13 years ago

  • Resolution set to invalid
  • Status changed from assigned to closed

Sorry, moving to another track.

#4 @foolswisdom
13 years ago

  • Milestone 2.1.3 deleted
Note: See TracTickets for help on using tickets.