Make WordPress Core


Ignore:
Timestamp:
05/16/2004 10:07:26 PM (22 years ago)
Author:
rboren
Message:

Allow underscores in category and author names.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions-formatting.php

    r1269 r1289  
    11<?php
     2
     3add_action('sanitize_title', 'convert_spaces_to_dashes');
    24
    35function wptexturize($text) {
     
    8284    $title = preg_replace('/[^a-z0-9 -]/', '', $title);
    8385    $title = preg_replace('/\s+/', ' ', $title);
     86    $title = do_action('sanitize_title', $title);
    8487    $title = trim($title);
    85     $title = str_replace(' ', '-', $title);
    86     $title = preg_replace('|-+|', '-', $title);
    8788    return $title;
     89}
     90
     91function convert_spaces_to_dashes($content) {
     92    $content = str_replace(' ', '-', $content);
     93    $content = preg_replace('|-+|', '-', $content);
    8894}
    8995
Note: See TracChangeset for help on using the changeset viewer.