From d85d717aedbc7690e2a450e40dab8fcebd94b38c Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 30 Oct 2007 16:49:38 +0000 Subject: Merge with WordPress 2.3.1 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1139 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/general-template.php | 52 +++------------------------------------- 1 file changed, 3 insertions(+), 49 deletions(-) (limited to 'wp-includes/general-template.php') diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index de8318c..9bee774 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -208,7 +208,7 @@ function wp_title($sep = '»', $display = true) { } if ( !empty($author_name) ) { // We do a direct query here because we don't cache by nicename. - $title = $wpdb->get_var($wpdb->prepare("SELECT display_name FROM $wpdb->users WHERE user_nicename = %s", $author_name)); + $title = $wpdb->get_var("SELECT display_name FROM $wpdb->users WHERE user_nicename = '$author_name'"); } // If there's a month @@ -255,7 +255,7 @@ function single_post_title($prefix = '', $display = true) { if ( intval($p) || '' != $name ) { if ( !$p ) - $p = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_name = %s", $name)); + $p = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_name = '$name'"); $post = & get_post($p); $title = $post->post_title; $title = apply_filters('single_post_title', $title); @@ -363,7 +363,7 @@ function wp_get_archives($args = '') { $type = 'monthly'; if ( '' != $limit ) { - $limit = abs(intval($limit)); + $limit = (int) $limit; $limit = ' LIMIT '.$limit; } @@ -1076,50 +1076,4 @@ function wp_admin_css( $file = 'wp-admin' ) { } } -/** - * Outputs the XHTML generator that is generated on the wp_head hook. - */ -function wp_generator() -{ - the_generator( apply_filters( 'wp_generator_type', 'xhtml' ) ); -} - -/** - * Outputs the generator XML or Comment for RSS, ATOM, etc. - * @param {String} $type The type of generator to return. - */ -function the_generator ( $type ) { - echo apply_filters('the_generator',get_the_generator($type),$type) . "\n"; -} - -/** - * Creates the generator XML or Comment for RSS, ATOM, etc. - * @param {String} $type The type of generator to return. - */ -function get_the_generator ( $type ) { - switch ($type) { - case 'html': - $gen = ''; - break; - case 'xhtml': - $gen = ''; - break; - case 'atom': - $gen = 'WordPress'; - break; - case 'rss2': - $gen = 'http://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) . ''; - break; - case 'rdf': - $gen = ''; - break; - case 'comment': - $gen = ''; - break; - case 'export': - $gen = ''; - break; - } - return apply_filters( "get_the_generator_{$type}", $gen, $type ); -} ?> -- cgit