[wp-trac] [WordPress Trac] #14269: Add capital_P_dangit patch to forums
WordPress Trac
wp-trac at lists.automattic.com
Mon Jul 12 23:18:48 UTC 2010
#14269: Add capital_P_dangit patch to forums
---------------------------+------------------------------------------------
Reporter: michaelh | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: WordPress.org site
Component: WordPress.org | Version:
Severity: normal | Resolution: fixed
Keywords: |
---------------------------+------------------------------------------------
Comment(by GDragoN):
Like it or not, capital_P_dangit() function included with WP 3.0 is just
bad. Simple search and replace has proven as problem, and the only
solution that will actually work is to use a function that uses regular
expressions and with that ignores the WordPress word in the URL's.
I wrote such function, and it's a part of my GD Press Tools plugin. Due to
some limitations in PHP regular expression engine, preg_replace function
can't be used in this case, but the function I wrote uses preg_match_all
and that replaces the word based on results from this function.
[http://wordpress.org/extend/plugins/gd-press-tools/ GD Press Tools on
WP.org]
[http://dv4p.com/gdpt GD Press Tools Home]
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14269#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list