diff --git a/wp-content/themes/default/archive.php b/wp-content/themes/default/archive.php index 1a9fc7a86..769f9abd1 100644 --- a/wp-content/themes/default/archive.php +++ b/wp-content/themes/default/archive.php @@ -29,7 +29,7 @@
-

+

diff --git a/wp-content/themes/default/attachment.php b/wp-content/themes/default/attachment.php index 82064316b..779af0df3 100644 --- a/wp-content/themes/default/attachment.php +++ b/wp-content/themes/default/attachment.php @@ -11,7 +11,7 @@ ID, true, array(450, 800)); // This also populates the iconsize for the next line ?> ID); $classname = ($_post->iconsize[0] <= 128 ? 'small' : '') . 'attachment'; // This lets us style narrow icons specially ?>
-

post_parent); ?> »

+

post_parent); ?> »


guid); ?>

diff --git a/wp-content/themes/default/index.php b/wp-content/themes/default/index.php index b60133932..6b692ce2b 100644 --- a/wp-content/themes/default/index.php +++ b/wp-content/themes/default/index.php @@ -7,7 +7,7 @@
-

+

diff --git a/wp-content/themes/default/search.php b/wp-content/themes/default/search.php index 7b980e216..910b65ec8 100644 --- a/wp-content/themes/default/search.php +++ b/wp-content/themes/default/search.php @@ -15,7 +15,7 @@
-

+

diff --git a/wp-content/themes/default/single.php b/wp-content/themes/default/single.php index 00de6a358..d270c052c 100644 --- a/wp-content/themes/default/single.php +++ b/wp-content/themes/default/single.php @@ -10,7 +10,7 @@
-

+

Read the rest of this entry »

'); ?> diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index ddb0a85c0..a956dc482 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -19,7 +19,7 @@ function get_the_ID() { function the_title($before = '', $after = '', $echo = true) { $title = get_the_title(); - if ( strlen($title) <= 0 ) + if ( strlen($title) == 0 ) return; $title = $before . $title . $after; @@ -30,6 +30,25 @@ function the_title($before = '', $after = '', $echo = true) { return $title; } +function the_title_attribute( $args = '' ) { + $title = get_the_title(); + + if ( strlen($title) == 0 ) + return; + + $defaults = array('before' => '', 'after' => '', 'echo' => true); + $r = wp_parse_args($args, $defaults); + extract( $r, EXTR_SKIP ); + + + $title = $before . $title . $after; + $title = attribute_escape(strip_tags($title)); + + if ( $echo ) + echo $title; + else + return $title; +} function get_the_title( $id = 0 ) { $post = &get_post($id);