From b4c55aa60b7753a43f561a06a4652dc9e4ace106 Mon Sep 17 00:00:00 2001 From: dd32 Date: Sat, 13 Feb 2010 09:59:16 +0000 Subject: [PATCH] Remove Direct SQL, Use new esc_html() function, Correct the case of the ID keys. See #9015 git-svn-id: http://svn.automattic.com/wordpress/trunk@13105 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyten/attachment.php | 8 ++++---- wp-content/themes/twentyten/header.php | 6 +++--- wp-content/themes/twentyten/index.php | 10 +++++++--- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/wp-content/themes/twentyten/attachment.php b/wp-content/themes/twentyten/attachment.php index b4393df001..c7bb9c285b 100644 --- a/wp-content/themes/twentyten/attachment.php +++ b/wp-content/themes/twentyten/attachment.php @@ -5,7 +5,7 @@ -

post_parent) ?>

+

post_parent) ?>

>

@@ -21,8 +21,8 @@
-id ) ) : $att_image = wp_get_attachment_image_src( $post->id, array(640,640)); ?> -

<?php $post->post_excerpt; ?> +ID ) ) : $att_image = wp_get_attachment_image_src( $post->ID, array(640, 640)); ?> +

<?php $post->post_excerpt; ?>

@@ -47,7 +47,7 @@ get_the_tag_list( __( ' and tagged ', 'twentyten' ), ', ', '' ), get_permalink(), the_title_attribute('echo=0'), - comments_rss() ) ?> + get_post_comments_feed_link() ) ?> Post a comment or leave a trackback: Trackback URL.', 'twentyten' ), get_trackback_url() ) ?> diff --git a/wp-content/themes/twentyten/header.php b/wp-content/themes/twentyten/header.php index e1b7b32d77..328c215dd7 100644 --- a/wp-content/themes/twentyten/header.php +++ b/wp-content/themes/twentyten/header.php @@ -5,7 +5,7 @@ if ( is_single() ) { single_post_title(); print ' | '; bloginfo('name'); } elseif ( is_home() || is_front_page() ) { bloginfo('name'); print ' | '; bloginfo('description'); get_page_number(); } elseif ( is_page() ) { single_post_title(''); print ' | '; bloginfo('name'); } - elseif ( is_search() ) { print 'Search results for ' . wp_specialchars($s); get_page_number(); print ' | '; bloginfo('name'); } + elseif ( is_search() ) { print 'Search results for ' . esc_html($s); get_page_number(); print ' | '; bloginfo('name'); } elseif ( is_404() ) { print 'Not Found | '; bloginfo('name'); } else { bloginfo('name'); wp_title('|'); get_page_number(); } ?> @@ -20,8 +20,8 @@ - - + + diff --git a/wp-content/themes/twentyten/index.php b/wp-content/themes/twentyten/index.php index 4b1e20a329..d691d9e1a3 100644 --- a/wp-content/themes/twentyten/index.php +++ b/wp-content/themes/twentyten/index.php @@ -24,9 +24,13 @@ the_permalink(); ?>" title="" rel="bookmark"><
- - -

%2$s photos.', 'twentyten'), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ) . '" rel="bookmark"', $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_parent = '$post->ID' AND post_type = 'attachment'" )); ?>

+ +

%2$s photos.', 'twentyten'), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__('Permalink to %s', 'twentyten'), the_title_attribute('echo=0') ) . '" rel="bookmark"', $total_images ); ?>