[wp-pro] Advanced Theme Functions

Celia Kyle celia.kyle at gmail.com
Mon Apr 13 20:28:14 GMT 2009


Good Afternoon!

I'm looking for assistance in incorporating some core changes I've made into
a theme's functions.php file as opposed to me having to constantly change a
core file.  This will also help me when upgrading installations.

A bit more about the changes I've been making:

Within wp-includes/formatting.php I changed This around line 50:

$dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/',
'/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/',
'/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');
    $dynamic_replacements = array('’$1','$1‘', '$1″', '$1′', '$1’$2',
'$1“$2', '� $1', '’$1', '$1×$2');

with this:

$dynamic_characters = array();
    $dynamic_replacements = array();

And then this around line 47:

 $static_characters = array_merge(array('---', ' -- ', '--', 'xn–',
'...', '``', '\'s', '\'\'', ' (tm)'), $cockney);
    $static_replacements = array_merge(array('—', ' — ', '–', 'xn--',
'…', '“', '’s', '� ', ' ™'), $cockneyreplace);

With this:

 $static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '
(tm)'), $cockney);
    $static_replacements = array_merge(array('—', ' — ', '–', 'xn--',
' ™'), $cockneyreplace);

The reason for these changes is that FLIR (http://facelift.mawhorter.net/)
titles with special characters have not been rendering properly due to the
way in which wordpress passes along the title to be replaced.  The above
corrects that.

So the question is, can this be built into theme functions or am I out of
luck?

I can be reached at celia.kyle AT gmail.com with estimates.

Thanks!

Celia Kyle
http://celiakyle.com

Don't just get Designed, Get Cesigned!
http://getcesigned.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://comox.textdrive.com/pipermail/wp-pro/attachments/20090413/796762ca/attachment.htm


More information about the wp-pro mailing list