mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
Added echo param to the_title() and the category_ID()
Fixed error with prematurely closing comments in rdf git-svn-id: http://svn.automattic.com/wordpress/trunk@363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e8ff560568
commit
2e2f6c2c58
@ -489,7 +489,7 @@ function the_ID() {
|
||||
echo $id;
|
||||
}
|
||||
|
||||
function the_title($before='', $after='') {
|
||||
function the_title($before='', $after='', $echo=true) {
|
||||
$title = get_the_title();
|
||||
$title = convert_bbcode($title);
|
||||
$title = convert_gmcode($title);
|
||||
@ -497,7 +497,10 @@ function the_title($before='', $after='') {
|
||||
if ($title) {
|
||||
$title = convert_chars($before.$title.$after);
|
||||
$title = apply_filters('the_title', $title);
|
||||
echo $title;
|
||||
if ($echo)
|
||||
echo $title;
|
||||
else
|
||||
return $title;
|
||||
}
|
||||
}
|
||||
function the_title_rss() {
|
||||
@ -997,9 +1000,12 @@ function get_the_category_by_ID($cat_ID) {
|
||||
return(stripslashes($cat_name));
|
||||
}
|
||||
|
||||
function the_category_ID() {
|
||||
function the_category_ID($echo=true) {
|
||||
global $post;
|
||||
echo $post->post_category;
|
||||
if ($echo)
|
||||
echo $post->post_category;
|
||||
else
|
||||
return $post->post_category;
|
||||
}
|
||||
|
||||
function the_category_head($before='', $after='') {
|
||||
@ -1325,7 +1331,7 @@ function trackback_rdf($timezone = 0) {
|
||||
echo ' dc:identifier="';
|
||||
permalink_single();
|
||||
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 '</rdf:RDF>';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user