Make WordPress Core


Ignore:
Timestamp:
09/09/2003 10:33:47 PM (21 years ago)
Author:
mikelittle
Message:

Added echo param to the_title() and the category_ID()
Fixed error with prematurely closing comments in rdf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2-include/b2template.functions.php

    r356 r363  
    490490}
    491491
    492 function the_title($before='', $after='') {
     492function the_title($before='', $after='', $echo=true) {
    493493    $title = get_the_title();
    494494    $title = convert_bbcode($title);
     
    498498        $title = convert_chars($before.$title.$after);
    499499        $title = apply_filters('the_title', $title);
    500         echo $title;
     500        if ($echo)
     501            echo $title;
     502        else
     503            return $title;
    501504    }
    502505}
     
    9981001}
    9991002
    1000 function the_category_ID() {
     1003function the_category_ID($echo=true) {
    10011004    global $post;
    1002     echo $post->post_category;
     1005    if ($echo)
     1006        echo $post->post_category;
     1007    else
     1008        return $post->post_category;
    10031009}
    10041010
     
    13261332        permalink_single();
    13271333        echo '"'."\n";
    1328         echo '    dc:title="'.addslashes(strip_tags(get_the_title())).'"'."\n";
     1334        echo '    dc:title="'.str_replace('--', '--', addslashes(strip_tags(get_the_title()))).'"'."\n";
    13291335        echo '    trackback:ping="'.trackback_url(0).'"'." />\n";
    13301336        echo '</rdf:RDF>';
Note: See TracChangeset for help on using the changeset viewer.