From 028a159440d756b584e1a43773609eed16f37157 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 6 Dec 2007 19:49:33 +0000 Subject: [PATCH] Remove unused vars. Props DD32. see #5418 git-svn-id: http://svn.automattic.com/wordpress/trunk@6364 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-app.php | 49 +-- wp-includes/author-template.php | 2 +- wp-includes/canonical.php | 4 +- wp-includes/capabilities.php | 1 - wp-includes/category-template.php | 4 +- wp-includes/category.php | 7 - wp-includes/comment-template.php | 8 +- wp-includes/comment.php | 10 +- wp-includes/feed.php | 15 +- wp-includes/formatting.php | 6 +- wp-includes/functions.php | 26 +- wp-includes/general-template.php | 16 +- wp-includes/l10n.php | 2 - wp-includes/link-template.php | 9 +- wp-includes/pluggable.php | 2 - wp-includes/post-template.php | 15 +- wp-includes/post.php | 34 +- wp-includes/query.php | 11 +- wp-includes/rewrite.php | 2 - wp-includes/taxonomy.php | 7 +- wp-includes/theme.php | 3 +- wp-includes/user.php | 2 - wp-includes/widgets.php | 9 +- wp-login.php | 2 +- xmlrpc.php | 618 ++++++++++++++---------------- 25 files changed, 368 insertions(+), 496 deletions(-) diff --git a/wp-app.php b/wp-app.php index 9a34fffcc0..b47ee21da5 100644 --- a/wp-app.php +++ b/wp-app.php @@ -215,7 +215,7 @@ EOD; * Create Post (No arguments) */ function create_post() { - global $blog_id, $wpdb; + global $blog_id, $user_ID; $this->get_accepted_content_type($this->atom_content_types); $parser = new AtomParser(); @@ -249,7 +249,7 @@ EOD; $blog_ID = (int ) $blog_id; $post_status = ($publish) ? 'publish' : 'draft'; - $post_author = (int) $user->ID; + $post_author = (int) $user_ID; $post_title = $entry->title[1]; $post_content = $entry->content[1]; $post_excerpt = $entry->summary[1]; @@ -269,9 +269,8 @@ EOD; if ( is_wp_error( $postID ) ) $this->internal_error($postID->get_error_message()); - if (!$postID) { + if (!$postID) $this->internal_error(__('Sorry, your entry could not be posted. Something wrong happened.')); - } // getting warning here about unable to set headers // because something in the cache is printing to the buffer @@ -296,8 +295,6 @@ EOD; } function put_post($postID) { - global $wpdb; - // checked for valid content-types (atom+xml) // quick check and exit $this->get_accepted_content_type($this->atom_content_types); @@ -313,7 +310,6 @@ EOD; // check for not found global $entry; - $entry = $GLOBALS['entry']; $this->set_current_entry($postID); if(!current_user_can('edit_post', $entry['ID'])) @@ -376,8 +372,6 @@ EOD; } function get_attachment($postID = NULL) { - - global $entry; if (!isset($postID)) { $this->get_attachments(); } else { @@ -389,7 +383,6 @@ EOD; } function create_attachment() { - global $wp, $wpdb, $wp_query, $blog_id; $type = $this->get_accepted_content_type(); @@ -418,9 +411,8 @@ EOD; $url = $file['url']; $file = $file['file']; - $filename = basename($file); - $header = apply_filters('wp_create_file_in_uploads', $file); // replicate + apply_filters('wp_create_file_in_uploads', $file); // replicate // Construct the attachment array $attachment = array( @@ -433,11 +425,10 @@ EOD; ); // Save the data - $postID = wp_insert_attachment($attachment, $file, $post); + $postID = wp_insert_attachment($attachment, $file); - if (!$postID) { + if (!$postID) $this->internal_error(__('Sorry, your entry could not be posted. Something wrong happened.')); - } $output = $this->get_entry($postID, 'attachment'); @@ -446,8 +437,6 @@ EOD; } function put_attachment($postID) { - global $wpdb; - // checked for valid content-types (atom+xml) // quick check and exit $this->get_accepted_content_type($this->atom_content_types); @@ -466,8 +455,6 @@ EOD; if(!current_user_can('edit_post', $entry['ID'])) $this->auth_required(__('Sorry, you do not have the right to edit this post.')); - $publish = (isset($parsed->draft) && trim($parsed->draft) == 'yes') ? false : true; - extract($entry); $post_title = $parsed->title[1]; @@ -546,8 +533,6 @@ EOD; function put_file($postID) { - $type = $this->get_accepted_content_type(); - // first check if user can upload if(!current_user_can('upload_files')) $this->auth_required(__('You do not have permission to upload files.')); @@ -605,17 +590,15 @@ EOD; } function the_entries_url($page = NULL) { - $url = $this->get_entries_url($page); - echo $url; + echo $this->get_entries_url($page); } - function get_categories_url($page = NULL) { + function get_categories_url($deprecated = '') { return $this->app_base . $this->CATEGORIES_PATH; } function the_categories_url() { - $url = $this->get_categories_url(); - echo $url; + echo $this->get_categories_url(); } function get_attachments_url($page = NULL) { @@ -627,8 +610,7 @@ EOD; } function the_attachments_url($page = NULL) { - $url = $this->get_attachments_url($page); - echo $url; + echo $this->get_attachments_url($page); } function get_service_url() { @@ -638,7 +620,7 @@ EOD; function get_entry_url($postID = NULL) { if(!isset($postID)) { global $post; - $postID = (int) $GLOBALS['post']->ID; + $postID = (int) $post->ID; } $url = $this->app_base . $this->ENTRY_PATH . "/$postID"; @@ -648,14 +630,13 @@ EOD; } function the_entry_url($postID = NULL) { - $url = $this->get_entry_url($postID); - echo $url; + echo $this->get_entry_url($postID); } function get_media_url($postID = NULL) { if(!isset($postID)) { global $post; - $postID = (int) $GLOBALS['post']->ID; + $postID = (int) $post->ID; } $url = $this->app_base . $this->MEDIA_SINGLE_PATH ."/file/$postID"; @@ -665,8 +646,7 @@ EOD; } function the_media_url($postID = NULL) { - $url = $this->get_media_url($postID); - echo $url; + echo $this->get_media_url($postID); } function set_current_entry($postID) { @@ -759,7 +739,6 @@ EOD; function get_entry($postID, $post_type = 'post') { log_app('function',"get_entry($postID, '$post_type')"); ob_start(); - global $posts, $post, $wp_query, $wp, $wpdb, $blog_id; switch($post_type) { case 'post': $varname = 'p'; diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php index 1049554497..c3364070d5 100644 --- a/wp-includes/author-template.php +++ b/wp-includes/author-template.php @@ -316,7 +316,7 @@ function the_author_posts_link($deprecated = '') { * @return string The URL to the author's page. */ function get_author_posts_url($author_id, $author_nicename = '') { - global $wpdb, $wp_rewrite, $post; + global $wp_rewrite; $auth_ID = (int) $author_id; $link = $wp_rewrite->get_author_permastruct(); diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index 600d881751..1d95b22adf 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -2,7 +2,7 @@ // Based on "Permalink Redirect" from Scott Yang and "Enforce www. Preference" by Mark Jaquith function redirect_canonical($requested_url=NULL, $do_redirect=true) { - global $wp_rewrite, $posts, $is_IIS; + global $wp_rewrite, $is_IIS; if ( is_feed() || is_trackback() || is_search() || is_comments_popup() || is_admin() || $is_IIS || ( isset($_POST) && count($_POST) ) || is_preview() ) return; @@ -176,7 +176,7 @@ function redirect_canonical($requested_url=NULL, $do_redirect=true) { } function redirect_guess_404_permalink() { - global $wp_query, $wpdb; + global $wpdb; if ( !get_query_var('name') ) return false; diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index 3c3594d1c5..40527c764c 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -138,7 +138,6 @@ class WP_User { var $allcaps = array(); function WP_User($id, $name = '') { - global $wpdb; if ( empty($id) && empty($name) ) return; diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 6efea7ba2a..e07f309a4a 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -66,7 +66,7 @@ function get_category_parents($id, $link = FALSE, $separator = '/', $nicename = } function get_the_category($id = false) { - global $post, $term_cache, $blog_id; + global $post, $term_cache; $id = (int) $id; if ( !$id ) @@ -168,7 +168,7 @@ function get_the_category_list($separator = '', $parents='') { } function in_category( $category ) { // Check if the current post is in the given category - global $post, $blog_id; + global $post; $categories = get_object_term_cache($post->ID, 'category'); if ( false === $categories ) diff --git a/wp-includes/category.php b/wp-includes/category.php index 71e5be8bde..1704280c39 100644 --- a/wp-includes/category.php +++ b/wp-includes/category.php @@ -1,8 +1,6 @@ term_id; @@ -132,8 +127,6 @@ function sanitize_category_field($field, $value, $cat_id, $context) { // Tags function &get_tags($args = '') { - global $wpdb, $category_links; - $key = md5( serialize( $args ) ); if ( $cache = wp_cache_get( 'get_tags', 'category' ) ) if ( isset( $cache[ $key ] ) ) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 1dc84c1934..c4aed30f03 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -38,7 +38,6 @@ function comment_author_email_link($linktext='', $before='', $after='') { } function get_comment_author_link() { - global $comment; $url = get_comment_author_url(); $author = get_comment_author(); @@ -72,7 +71,6 @@ function comment_author_url() { } function get_comment_author_url_link( $linktext = '', $before = '', $after = '' ) { - global $comment; $url = get_comment_author_url(); $display = ($linktext != '') ? $linktext : $url; $display = str_replace( 'http://www.', '', $display ); @@ -146,7 +144,6 @@ function comments_link( $file = '', $echo = true ) { } function get_comments_number( $post_id = 0 ) { - global $wpdb, $id; $post_id = (int) $post_id; if ( !$post_id ) @@ -237,7 +234,6 @@ function trackback_url($deprecated = true) { // remove backwards compat in 2.4 } function trackback_rdf($timezone = 0) { - global $id; if (stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false) { echo 'prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d", $comment_ID); if ( false == $include_unapproved ) @@ -129,7 +129,7 @@ function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = fals function get_lastcommentmodified($timezone = 'server') { - global $cache_lastcommentmodified, $pagenow, $wpdb; + global $cache_lastcommentmodified, $wpdb; $add_seconds_blog = get_option('gmt_offset') * 3600; $add_seconds_server = date('Z'); $now = current_time('mysql', 1); @@ -228,8 +228,6 @@ function check_comment_flood_db( $ip, $email, $date ) { } function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent) { - global $wpdb; - do_action('wp_blacklist_check', $author, $email, $url, $comment, $user_ip, $user_agent); if ( preg_match_all('/&#(\d+);/', $comment . $author . $url, $chars) ) { @@ -293,8 +291,6 @@ function wp_delete_comment($comment_id) { function wp_get_comment_status($comment_id) { - global $wpdb; - $comment = get_comment($comment_id); if ( !$comment ) return false; @@ -686,7 +682,7 @@ function generic_ping($post_id = 0) { function pingback($content, $post_ID) { - global $wp_version, $wpdb; + global $wp_version; include_once(ABSPATH . WPINC . '/class-IXR.php'); // original code by Mort (http://mort.mine.nu:8080) diff --git a/wp-includes/feed.php b/wp-includes/feed.php index 24f5f9d276..74cb36ed35 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -98,19 +98,19 @@ function comment_text_rss() { } -function comments_rss_link($link_text = 'Comments RSS', $commentsrssfilename = 'nolongerused') { +function comments_rss_link($link_text = 'Comments RSS', $deprecated = '') { $url = get_post_comments_feed_link(); echo "$link_text"; } -function comments_rss($commentsrssfilename = 'nolongerused') { +function comments_rss($deprecated = '') { return get_post_comments_feed_link(); } function get_author_rss_link($echo = false, $author_id, $author_nicename) { - $auth_ID = (int) $author_id; + $author_id = (int) $author_id; $permalink_structure = get_option('permalink_structure'); if ( '' == $permalink_structure ) { @@ -168,8 +168,8 @@ function get_category_feed_link($cat_id, $feed = 'rss2') { } -function get_category_rss_link($echo = false, $cat_ID, $category_nicename) { - $link = get_category_feed_link($cat_ID, $feed = 'rss2'); +function get_category_rss_link($echo = false, $cat_ID, $deprecated = '') { + $link = get_category_feed_link($cat_ID, 'rss2'); if ( $echo ) echo $link; @@ -180,7 +180,6 @@ function get_category_rss_link($echo = false, $cat_ID, $category_nicename) { function get_the_category_rss($type = 'rss') { $categories = get_the_category(); $tags = get_the_tags(); - $home = get_bloginfo_rss('home'); $the_list = ''; $cat_names = array(); @@ -252,7 +251,7 @@ function html_type_rss() { function rss_enclosure() { - global $id, $post; + global $post; if ( !empty($post->post_password) && ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) ) return; @@ -267,7 +266,7 @@ function rss_enclosure() { } function atom_enclosure() { - global $id, $post; + global $post; if ( !empty($post->post_password) && ($_COOKIE['wp-postpass_'.COOKIEHASH] != $post->post_password) ) return; diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index b7b9a67bb5..a9235210f7 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -363,7 +363,7 @@ function sanitize_title_with_dashes($title) { return $title; } -function convert_chars($content, $flag = 'obsolete') { +function convert_chars($content, $deprecated = '') { // Translation of invalid Unicode references range to valid range $wp_htmltranswinuni = array( '€' => '€', // the Euro sign @@ -560,7 +560,6 @@ function format_to_edit($content, $richedit = false) { } function format_to_post($content) { - global $wpdb; $content = apply_filters('format_to_post', $content); return $content; } @@ -783,7 +782,7 @@ function human_time_diff( $from, $to = '' ) { } else if (($diff <= 86400) && ($diff > 3600)) { $hours = round($diff / 3600); if ($hours <= 1) { - $hour = 1; + $hours = 1; } $since = sprintf(__ngettext('%s hour', '%s hours', $hours), $hours); } elseif ($diff >= 86400) { @@ -797,7 +796,6 @@ function human_time_diff( $from, $to = '' ) { } function wp_trim_excerpt($text) { // Fakes an excerpt if needed - global $post; if ( '' == $text ) { $text = get_the_content(''); $text = apply_filters('the_content', $text); diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 6a2e9e715d..2ab691af9f 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -108,23 +108,25 @@ function size_format( $bytes, $decimals = null ) { } -function get_weekstartend( $mysqlstring, $start_of_week ) { +function get_weekstartend( $mysqlstring, $start_of_week = '' ) { $my = substr( $mysqlstring, 0, 4 ); $mm = substr( $mysqlstring, 8, 2 ); $md = substr( $mysqlstring, 5, 2 ); $day = mktime( 0, 0, 0, $md, $mm, $my ); $weekday = date( 'w', $day ); $i = 86400; + if( !is_numeric($a) ) + $start_of_week = get_option( 'start_of_week' ); - if ( $weekday < get_option( 'start_of_week' ) ) - $weekday = 7 - ( get_option( 'start_of_week' ) - $weekday ); + if ( $weekday < $start_of_week ) + $weekday = 7 - $start_of_week - $weekday; - while ( $weekday > get_option( 'start_of_week' ) ) { + while ( $weekday > $start_of_week ) { $weekday = date( 'w', $day ); - if ( $weekday < get_option( 'start_of_week' ) ) - $weekday = 7 - ( get_option( 'start_of_week' ) - $weekday ); + if ( $weekday < $start_of_week ) + $weekday = 7 - $start_of_week - $weekday; - $day = $day - 86400; + $day -= 86400; $i = 0; } $week['start'] = $day + 86400 - $i; @@ -488,7 +490,7 @@ function debug_fclose( $fp ) { } function do_enclose( $content, $post_ID ) { - global $wp_version, $wpdb; + global $wpdb; include_once( ABSPATH . WPINC . '/class-IXR.php' ); $log = debug_fopen( ABSPATH . 'enclosures.log', 'a' ); @@ -1028,7 +1030,7 @@ function wp_upload_dir() { return apply_filters( 'upload_dir', $uploads ); } -function wp_upload_bits( $name, $type, $bits ) { +function wp_upload_bits( $name, $deprecated, $bits ) { if ( empty( $name ) ) return array( 'error' => __( "Empty filename" ) ); @@ -1066,7 +1068,7 @@ function wp_upload_bits( $name, $type, $bits ) { if ( ! $ifp ) return array( 'error' => sprintf( __( 'Could not write file %s' ), $new_file ) ); - $success = @fwrite( $ifp, $bits ); + @fwrite( $ifp, $bits ); fclose( $ifp ); // Set correct file permissions $stat = @ stat( dirname( $new_file ) ); @@ -1211,7 +1213,7 @@ function wp_explain_nonce( $action ) { function wp_nonce_ays( $action ) { - global $pagenow, $menu, $submenu, $parent_file, $submenu_file; + global $pagenow; $adminurl = get_option( 'siteurl' ) . '/wp-admin'; if ( wp_get_referer() ) @@ -1499,7 +1501,7 @@ function url_is_accessable_via_ssl($url) curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); - $data = curl_exec ($ch); + curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close ($ch); diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index a9d75fbd74..5dcea03c2d 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -164,8 +164,6 @@ function wp_title($sep = '»', $display = true) { $cat = get_query_var('cat'); $tag = get_query_var('tag_id'); - $p = get_query_var('p'); - $name = get_query_var('name'); $category_name = get_query_var('category_name'); $author = get_query_var('author'); $author_name = get_query_var('author_name'); @@ -386,9 +384,6 @@ function wp_get_archives($args = '') { $archive_week_end_date_format = get_option('date_format'); } - $add_hours = intval(get_option('gmt_offset')); - $add_minutes = intval(60 * (get_option('gmt_offset') - $add_hours)); - //filters $where = apply_filters('getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r ); $join = apply_filters('getarchives_join', "", $r); @@ -524,7 +519,7 @@ function calendar_week_mod($num) { function get_calendar($initial = true) { - global $wpdb, $m, $monthnum, $year, $timedifference, $wp_locale, $posts; + global $wpdb, $m, $monthnum, $year, $wp_locale, $posts; $key = md5( $m . $monthnum . $year ); if ( $cache = wp_cache_get( 'get_calendar', 'calendar' ) ) { @@ -547,8 +542,6 @@ function get_calendar($initial = true) { // week_begins = 0 stands for Sunday $week_begins = intval(get_option('start_of_week')); - $add_hours = intval(get_option('gmt_offset')); - $add_minutes = intval(60 * (get_option('gmt_offset') - $add_hours)); // Let's figure out when we are if ( !empty($monthnum) && !empty($year) ) { @@ -560,7 +553,6 @@ function get_calendar($initial = true) { $d = (($w - 1) * 7) + 6; //it seems MySQL's weeks disagree with PHP's $thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('${thisyear}0101', INTERVAL $d DAY) ), '%m')"); } elseif ( !empty($m) ) { - $calendar = substr($m, 0, 6); $thisyear = ''.intval(substr($m, 0, 4)); if ( strlen($m) < 6 ) $thismonth = '01'; @@ -755,7 +747,7 @@ function the_date_xml() { function the_date($d='', $before='', $after='', $echo = true) { - global $id, $post, $day, $previousday; + global $post, $day, $previousday; $the_date = ''; if ( $day != $previousday ) { $the_date .= $before; @@ -842,7 +834,7 @@ function get_post_modified_time( $d = 'U', $gmt = false ) { // returns timestamp function the_weekday() { - global $wp_locale, $id, $post; + global $wp_locale, $post; $the_weekday = $wp_locale->get_weekday(mysql2date('w', $post->post_date)); $the_weekday = apply_filters('the_weekday', $the_weekday); echo $the_weekday; @@ -850,7 +842,7 @@ function the_weekday() { function the_weekday_date($before='',$after='') { - global $wp_locale, $id, $post, $day, $previousweekday; + global $wp_locale, $post, $day, $previousweekday; $the_weekday_date = ''; if ( $day != $previousweekday ) { $the_weekday_date .= $before; diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 4dba679896..0933d42f97 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -75,8 +75,6 @@ function load_textdomain($domain, $mofile) { } function load_default_textdomain() { - global $l10n; - $locale = get_locale(); if ( empty($locale) ) $locale = 'en_US'; diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 8557aec543..f2bdfe999d 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -232,9 +232,6 @@ function get_day_link($year, $month, $day) { function get_feed_link($feed='rss2') { global $wp_rewrite; - $do_perma = 0; - $feed_url = get_option('siteurl'); - $comment_feed_url = $feed_url; $permalink = $wp_rewrite->get_feed_permastruct(); if ( '' != $permalink ) { @@ -494,7 +491,7 @@ function get_pagenum_link($pagenum = 1) { } function get_next_posts_page_link($max_page = 0) { - global $paged, $pagenow; + global $paged; if ( !is_single() ) { if ( !$paged ) @@ -510,7 +507,7 @@ function next_posts($max_page = 0) { } function next_posts_link($label='Next Page »', $max_page=0) { - global $paged, $wpdb, $wp_query; + global $paged, $wp_query; if ( !$max_page ) { $max_page = $wp_query->max_num_pages; } @@ -525,7 +522,7 @@ function next_posts_link($label='Next Page »', $max_page=0) { } function get_previous_posts_page_link() { - global $paged, $pagenow; + global $paged; if ( !is_single() ) { $nextpage = intval($paged) - 1; diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 4a773b2706..6e79f947e9 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -528,8 +528,6 @@ endif; if ( ! function_exists('wp_notify_postauthor') ) : function wp_notify_postauthor($comment_id, $comment_type='') { - global $wpdb; - $comment = get_comment($comment_id); $post = get_post($comment->comment_post_ID); $user = get_userdata( $post->post_author ); diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 175906c5e0..7c426adbc1 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -81,9 +81,8 @@ function the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file function get_the_content($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { - global $id, $post, $more, $single, $withcomments, $page, $pages, $multipage, $numpages; - global $preview; - global $pagenow; + global $id, $post, $more, $page, $pages, $multipage, $preview, $pagenow; + $output = ''; if ( !empty($post->post_password) ) { // if there's a password @@ -137,8 +136,8 @@ function the_excerpt() { } -function get_the_excerpt($deprecated = true) { - global $id, $post; +function get_the_excerpt($deprecated = '') { + global $post; $output = ''; $output = $post->post_excerpt; if ( !empty($post->post_password) ) { // if there's a password @@ -167,7 +166,7 @@ function wp_link_pages($args = '') { $r = wp_parse_args( $args, $defaults ); extract( $r, EXTR_SKIP ); - global $post, $id, $page, $numpages, $multipage, $more, $pagenow; + global $post, $page, $numpages, $multipage, $more, $pagenow; if ( $more_file != '' ) $file = $more_file; else @@ -249,8 +248,6 @@ function post_custom( $key = '' ) { // this will probably change at some point... function the_meta() { - global $id; - if ( $keys = get_post_custom_keys() ) { echo "