Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 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 9 years ago.
Patch to sanitize_title()
default-filters_php.patch (4.4 KB) - added by harkos 9 years ago.
Patch to trim() getting more arguments

Download all attachments as: .zip

Change History (6)

@harkos9 years ago

Patch to sanitize_title()

comment:1 @harkos9 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.

comment:2 @harkos9 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.

@harkos9 years ago

Patch to trim() getting more arguments

comment:3 @harkos9 years ago

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

Sorry, moving to another track.

comment:4 @foolswisdom9 years ago

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