Make WordPress Core

Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#3974 closed enhancement (invalid)

Filtering titles to sanitize

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

Description

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

Download all attachments as: .zip

Change History (6)

@harkos
20 years ago

Patch to sanitize_title()

#1 @harkos
20 years ago

  • Owner changed from anonymous to harkos
  • Status new → 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
20 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.

@harkos
20 years ago

Patch to trim() getting more arguments

#3 @harkos
20 years ago

  • Resolution → invalid
  • Status assigned → closed

Sorry, moving to another track.

#4 @foolswisdom
20 years ago

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