Added echo param to the_title() and the category_ID()
Fixed error with prematurely closing comments in rdf git-svn-id: https://develop.svn.wordpress.org/trunk@363 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9861b6991d
commit
49d283ce51
@ -489,7 +489,7 @@ function the_ID() {
|
|||||||
echo $id;
|
echo $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
function the_title($before='', $after='') {
|
function the_title($before='', $after='', $echo=true) {
|
||||||
$title = get_the_title();
|
$title = get_the_title();
|
||||||
$title = convert_bbcode($title);
|
$title = convert_bbcode($title);
|
||||||
$title = convert_gmcode($title);
|
$title = convert_gmcode($title);
|
||||||
@ -497,7 +497,10 @@ function the_title($before='', $after='') {
|
|||||||
if ($title) {
|
if ($title) {
|
||||||
$title = convert_chars($before.$title.$after);
|
$title = convert_chars($before.$title.$after);
|
||||||
$title = apply_filters('the_title', $title);
|
$title = apply_filters('the_title', $title);
|
||||||
|
if ($echo)
|
||||||
echo $title;
|
echo $title;
|
||||||
|
else
|
||||||
|
return $title;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function the_title_rss() {
|
function the_title_rss() {
|
||||||
@ -997,9 +1000,12 @@ function get_the_category_by_ID($cat_ID) {
|
|||||||
return(stripslashes($cat_name));
|
return(stripslashes($cat_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
function the_category_ID() {
|
function the_category_ID($echo=true) {
|
||||||
global $post;
|
global $post;
|
||||||
|
if ($echo)
|
||||||
echo $post->post_category;
|
echo $post->post_category;
|
||||||
|
else
|
||||||
|
return $post->post_category;
|
||||||
}
|
}
|
||||||
|
|
||||||
function the_category_head($before='', $after='') {
|
function the_category_head($before='', $after='') {
|
||||||
@ -1325,7 +1331,7 @@ function trackback_rdf($timezone = 0) {
|
|||||||
echo ' dc:identifier="';
|
echo ' dc:identifier="';
|
||||||
permalink_single();
|
permalink_single();
|
||||||
echo '"'."\n";
|
echo '"'."\n";
|
||||||
echo ' dc:title="'.addslashes(strip_tags(get_the_title())).'"'."\n";
|
echo ' dc:title="'.str_replace('--', '--', addslashes(strip_tags(get_the_title()))).'"'."\n";
|
||||||
echo ' trackback:ping="'.trackback_url(0).'"'." />\n";
|
echo ' trackback:ping="'.trackback_url(0).'"'." />\n";
|
||||||
echo '</rdf:RDF>';
|
echo '</rdf:RDF>';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user