WordPress.org

Make WordPress Core

Changeset 2227


Ignore:
Timestamp:
02/06/05 03:40:08 (9 years ago)
Author:
rboren
Message:

Correctly add args to strings that contain only a query string and not a full URI.

Location:
trunk/wp-includes
Files:
9 edited

Legend:

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

    r2168 r2227  
    599599     
    600600    if ($wpdb->query($query)) { 
    601         do_action('wp_set_comment_status', $comment_id); 
     601        do_action('wp_set_comment_status', $comment_id, $comment_status); 
    602602        return true; 
    603603    } else { 
  • trunk/wp-includes/feed-functions.php

    r2167 r2227  
    132132        } 
    133133    } 
    134     echo apply_filters('the_category_rss', $the_list); 
     134    echo apply_filters('the_category_rss', $the_list, $type); 
    135135} 
    136136 
  • trunk/wp-includes/functions-post.php

    r2225 r2227  
    390390    global $wpdb; 
    391391 
    392     do_action('wp_blacklist_check'); 
     392    do_action('wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent); 
    393393 
    394394    if ( preg_match_all('/&#(\d+);/', $comment . $author . $url, $chars) ) { 
     
    462462        $time_newcomment  = mysql2date('U', $now_gmt); 
    463463        if ( ($time_newcomment - $time_lastcomment) < 15 ) { 
    464             do_action('comment_flood_trigger'); 
     464            do_action('comment_flood_trigger', $time_lastcomment, $time_newcomment); 
    465465            die( __('Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.') ); 
    466466        } 
     
    483483 
    484484    $comment_id = $wpdb->insert_id; 
    485     do_action('comment_post', $comment_id); 
     485    do_action('comment_post', $comment_id, $approved); 
    486486 
    487487    if ( 'spam' !== $approved ) { // If it's spam save it silently for later crunching 
  • trunk/wp-includes/functions.php

    r2223 r2227  
    16701670        } 
    16711671    } 
    1672     else { 
     1672    else if (! ststr($uri, '/')) { 
    16731673        $base = $uri . '?'; 
    16741674        $query = ''; 
  • trunk/wp-includes/template-functions-author.php

    r2154 r2227  
    137137    } 
    138138 
    139         $link = apply_filters('author_link', $link); 
     139        $link = apply_filters('author_link', $link, $author_id, $author_nicename); 
    140140    if ($echo) echo $link; 
    141141    return $link; 
  • trunk/wp-includes/template-functions-category.php

    r2164 r2227  
    4040            $catlink = get_settings('home') . trailingslashit($catlink); 
    4141    } 
    42         $catlink = apply_filters('category_link', $catlink); 
     42        $catlink = apply_filters('category_link', $catlink, $category_id, $category_nicename); 
    4343    if ($echo) echo $catlink; 
    4444    return $catlink; 
     
    100100        } 
    101101    } 
    102     echo apply_filters('the_category', $thelist); 
     102    echo apply_filters('the_category', $thelist, $separator, $parents); 
    103103} 
    104104 
     
    174174    if (!$category) $category = $cat; 
    175175    $category_description = $cache_categories[$category]->category_description; 
    176     $category_description = apply_filters('category_description', $category_description); 
     176    $category_description = apply_filters('category_description', $category_description, $category); 
    177177    return $category_description; 
    178178} 
     
    213213    if ($categories) { 
    214214        foreach ($categories as $category) { 
    215             $cat_name = apply_filters('list_cats', $category->cat_name); 
     215            $cat_name = apply_filters('list_cats', $category->cat_name, $category); 
    216216            echo "\t<option value=\"".$category->cat_ID."\""; 
    217217            if ($category->cat_ID == $selected) 
     
    329329                $link .= 'title="'. sprintf(__("View all posts filed under %s"), wp_specialchars($category->cat_name)) . '"'; 
    330330            } else { 
    331                 $link .= 'title="' . wp_specialchars(apply_filters('category_description',$category->category_description)) . '"'; 
     331                $link .= 'title="' . wp_specialchars(apply_filters('category_description',$category->category_description,$category)) . '"'; 
    332332            } 
    333333            $link .= '>'; 
    334             $link .= apply_filters('list_cats', $category->cat_name).'</a>'; 
     334            $link .= apply_filters('list_cats', $category->cat_name, $category).'</a>'; 
    335335 
    336336            if ( (! empty($feed_image)) || (! empty($feed)) ) { 
  • trunk/wp-includes/template-functions-general.php

    r2184 r2227  
    6060function bloginfo($show='') { 
    6161    $info = get_bloginfo($show); 
    62     $info = apply_filters('bloginfo', $info); 
     62    $info = apply_filters('bloginfo', $info, $show); 
    6363    echo convert_chars($info); 
    6464} 
     
    596596        $previousday = $day; 
    597597    } 
    598     $the_date = apply_filters('the_date', $the_date); 
     598    $the_date = apply_filters('the_date', $the_date, $d, $before, $after); 
    599599    if ($echo) { 
    600600        echo $the_date; 
     
    605605 
    606606function the_time( $d = '' ) { 
    607     echo apply_filters('the_time', get_the_time( $d ) ); 
     607    echo apply_filters('the_time', get_the_time( $d ), $d); 
    608608} 
    609609 
     
    613613    else 
    614614        $the_time = get_post_time($d); 
    615     return apply_filters('get_the_time', $the_time); 
     615    return apply_filters('get_the_time', $the_time, $d); 
    616616} 
    617617 
     
    624624 
    625625    $time = mysql2date($d, $time); 
    626     return apply_filters('get_the_time', $time); 
     626    return apply_filters('get_the_time', $time, $d, $gmt); 
    627627} 
    628628 
     
    643643        $previousweekday = $day; 
    644644    } 
    645     $the_weekday_date = apply_filters('the_weekday_date', $the_weekday_date); 
     645    $the_weekday_date = apply_filters('the_weekday_date', $the_weekday_date, $before, $after); 
    646646    echo $the_weekday_date; 
    647647} 
  • trunk/wp-includes/template-functions-links.php

    r2195 r2227  
    7575            $idpost->post_name, 
    7676        ); 
    77         return apply_filters('post_link', get_settings('home') . str_replace($rewritecode, $rewritereplace, $permalink)); 
     77        return apply_filters('post_link', get_settings('home') . str_replace($rewritecode, $rewritereplace, $permalink), $idpost); 
    7878    } else { // if they're not using the fancy permalink option 
    7979        $permalink = get_settings('home') . '/?p=' . $idpost->ID; 
    80         return apply_filters('post_link', $permalink); 
     80        return apply_filters('post_link', $permalink, $idpost); 
    8181    } 
    8282} 
     
    9999    } 
    100100 
    101     return apply_filters('page_link', $link); 
     101    return apply_filters('page_link', $link, $id); 
    102102} 
    103103 
     
    108108    if (!empty($yearlink)) { 
    109109        $yearlink = str_replace('%year%', $year, $yearlink); 
    110         return apply_filters('year_link', get_settings('home') . trailingslashit($yearlink)); 
     110        return apply_filters('year_link', get_settings('home') . trailingslashit($yearlink), $year); 
    111111    } else { 
    112         return apply_filters('year_link', get_settings('home') .'/'. $querystring_start.'m'.$querystring_equal.$year); 
     112        return apply_filters('year_link', get_settings('home') .'/'. $querystring_start.'m'.$querystring_equal.$year, $year); 
    113113    } 
    114114} 
     
    122122        $monthlink = str_replace('%year%', $year, $monthlink); 
    123123        $monthlink = str_replace('%monthnum%', zeroise(intval($month), 2), $monthlink); 
    124         return apply_filters('month_link', get_settings('home') . trailingslashit($monthlink)); 
     124        return apply_filters('month_link', get_settings('home') . trailingslashit($monthlink), $year, $month); 
    125125    } else { 
    126         return apply_filters('month_link', get_settings('home') .'/'. $querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2)); 
     126        return apply_filters('month_link', get_settings('home') .'/'. $querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2), $year, $month); 
    127127    } 
    128128} 
     
    139139        $daylink = str_replace('%monthnum%', zeroise(intval($month), 2), $daylink); 
    140140        $daylink = str_replace('%day%', zeroise(intval($day), 2), $daylink); 
    141         return apply_filters('day_link', get_settings('home') . trailingslashit($daylink)); 
     141        return apply_filters('day_link', get_settings('home') . trailingslashit($daylink), $year, $month, $day); 
    142142    } else { 
    143         return apply_filters('day_link', get_settings('home') .'/'. $querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2).zeroise($day, 2)); 
     143        return apply_filters('day_link', get_settings('home') .'/'. $querystring_start.'m'.$querystring_equal.$year.zeroise($month, 2).zeroise($day, 2), $year, $month, $day); 
    144144    } 
    145145} 
     
    171171    } 
    172172 
    173     return apply_filters('feed_link', $output); 
     173    return apply_filters('feed_link', $output, $feed); 
    174174} 
    175175 
     
    265265  } 
    266266 
    267   $title = apply_filters('the_title', $post->post_title); 
     267  $title = apply_filters('the_title', $post->post_title, $post); 
    268268 
    269269  $string = '<a href="'.get_permalink($post->ID).'">'; 
     
    285285  } 
    286286 
    287   $title = apply_filters('the_title', $post->post_title); 
     287  $title = apply_filters('the_title', $post->post_title, $post); 
    288288 
    289289  $string = '<a href="'.get_permalink($post->ID).'">'; 
  • trunk/wp-includes/template-functions-post.php

    r2208 r2227  
    3232    $title = get_the_title(); 
    3333    if (!empty($title)) { 
    34         $title = apply_filters('the_title', $before . $title . $after); 
     34        $title = apply_filters('the_title', $before . $title . $after, $before, $after); 
    3535        if ($echo) 
    3636            echo $title; 
Note: See TracChangeset for help on using the changeset viewer.