Changeset 5952

Show
Ignore:
Timestamp:
08/27/07 23:31:09 (1 year ago)
Author:
ryan
Message:

Add clean_url filter. see #4570

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/formatting.php

    r5930 r5952  
    10751075 
    10761076function clean_url( $url, $protocols = null ) { 
     1077    $original_url = $url; 
     1078 
    10771079    if ('' == $url) return $url; 
    10781080    $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%]|i', '', $url); 
     
    10901092    if ( wp_kses_bad_protocol( $url, $protocols ) != $url ) 
    10911093        return ''; 
    1092     return $url; 
     1094 
     1095    return apply_filters('clean_url', $url, $original_url); 
    10931096} 
    10941097 
  • trunk/wp-includes/taxonomy.php

    r5938 r5952  
    10551055 
    10561056function _get_term_hierarchy($taxonomy) { 
    1057     // TODO Make sure taxonomy is hierarchical 
     1057    if ( !is_taxonomy_hierarchical($taxonomy) ) 
     1058        return array(); 
    10581059    $children = get_option("{$taxonomy}_children"); 
    10591060    if ( is_array($children) )