Unused var cleanup. Props DD32. see #5418

git-svn-id: http://svn.automattic.com/wordpress/trunk@6551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-01-04 19:36:34 +00:00
parent f05fe26e0c
commit 1ae1811dd0
19 changed files with 41 additions and 35 deletions

View File

@ -228,7 +228,7 @@ Event.observe( window, 'load', hide_text );
if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) { if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) {
set_theme_mod('header_image', clean_url($url)); set_theme_mod('header_image', clean_url($url));
apply_filters('wp_create_file_in_uploads', $file, $id); // For replication do_action('wp_create_file_in_uploads', $file, $id); // For replication
return $this->finished(); return $this->finished();
} elseif ( $width > HEADER_IMAGE_WIDTH ) { } elseif ( $width > HEADER_IMAGE_WIDTH ) {
$oitar = $width / HEADER_IMAGE_WIDTH; $oitar = $width / HEADER_IMAGE_WIDTH;

View File

@ -106,7 +106,6 @@ class WP_Import {
continue; continue;
} }
if ( false !== strpos($importline, '</item>') ) { if ( false !== strpos($importline, '</item>') ) {
$num++;
$doing_entry = false; $doing_entry = false;
if ($process_post_func) if ($process_post_func)
call_user_func($process_post_func, $this->post); call_user_func($process_post_func, $this->post);
@ -400,7 +399,7 @@ class WP_Import {
$post_author = $this->checkauthor($post_author); //just so that if a post already exists, new users are not created by checkauthor $post_author = $this->checkauthor($post_author); //just so that if a post already exists, new users are not created by checkauthor
$postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_excerpt', 'post_status', 'post_name', 'comment_status', 'ping_status', 'post_modified', 'post_modified_gmt', 'guid', 'post_parent', 'menu_order', 'post_type'); $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_status', 'post_name', 'comment_status', 'ping_status', 'guid', 'post_parent', 'menu_order', 'post_type');
if ($post_type == 'attachment') { if ($post_type == 'attachment') {
$remote_url = $this->get_tag( $post, 'wp:attachment_url' ); $remote_url = $this->get_tag( $post, 'wp:attachment_url' );
if ( !$remote_url ) if ( !$remote_url )

View File

@ -114,8 +114,6 @@ function check_all_rows() {
} }
function _category_exists($cat_id) { function _category_exists($cat_id) {
global $wpdb;
$cat_id = (int) $cat_id; $cat_id = (int) $cat_id;
$maybe_exists = category_exists($cat_id); $maybe_exists = category_exists($cat_id);

View File

@ -112,6 +112,7 @@ function wp_handle_upload( &$file, $overrides = false ) {
// If you override this, you must provide $ext and $type!!!! // If you override this, you must provide $ext and $type!!!!
$test_type = true; $test_type = true;
$mimes = false;
// Install user overrides. Did we mention that this voids your warranty? // Install user overrides. Did we mention that this voids your warranty?
if ( is_array( $overrides ) ) if ( is_array( $overrides ) )

View File

@ -130,7 +130,7 @@ function update_recently_edited( $file ) {
// If siteurl or home changed, flush rewrite rules. // If siteurl or home changed, flush rewrite rules.
function update_home_siteurl( $old_value, $value ) { function update_home_siteurl( $old_value, $value ) {
global $wp_rewrite, $user_login, $user_pass_md5; global $wp_rewrite;
if ( defined( "WP_INSTALLING" ) ) if ( defined( "WP_INSTALLING" ) )
return; return;

View File

@ -102,11 +102,6 @@ function checked( $checked, $current) {
echo ' checked="checked"'; echo ' checked="checked"';
} }
// TODO: Remove?
function documentation_link( $for ) {
return;
}
function selected( $selected, $current) { function selected( $selected, $current) {
if ( $selected == $current) if ( $selected == $current)
echo ' selected="selected"'; echo ' selected="selected"';

View File

@ -2,7 +2,7 @@
// The admin side of our 1.0 update system // The admin side of our 1.0 update system
function core_update_footer( $msg ) { function core_update_footer( $msg = '' ) {
if ( !current_user_can('manage_options') ) if ( !current_user_can('manage_options') )
return sprintf( '| '.__( 'Version %s' ), $GLOBALS['wp_version'] ); return sprintf( '| '.__( 'Version %s' ), $GLOBALS['wp_version'] );

View File

@ -123,7 +123,7 @@ else
} // end else } // end else
if ( ! $blogrolling ) if ( ! $blogrolling )
apply_filters( 'wp_delete_file', $opml_url); do_action( 'wp_delete_file', $opml_url);
@unlink($opml_url); @unlink($opml_url);
?> ?>
</div> </div>

View File

@ -425,7 +425,7 @@ EOD;
$url = $file['url']; $url = $file['url'];
$file = $file['file']; $file = $file['file'];
apply_filters('wp_create_file_in_uploads', $file); // replicate do_action('wp_create_file_in_uploads', $file); // replicate
// Construct the attachment array // Construct the attachment array
$attachment = array( $attachment = array(

View File

@ -66,7 +66,7 @@ function get_category_parents($id, $link = FALSE, $separator = '/', $nicename =
} }
function get_the_category($id = false) { function get_the_category($id = false) {
global $post, $term_cache; global $post;
$id = (int) $id; $id = (int) $id;
if ( !$id ) if ( !$id )

View File

@ -740,7 +740,7 @@ class WP_Ajax_Response {
$r = wp_parse_args( $args, $defaults ); $r = wp_parse_args( $args, $defaults );
extract( $r, EXTR_SKIP ); extract( $r, EXTR_SKIP );
$postition = preg_replace( '/[^a-z0-9:_-]/i', '', $position ); $position = preg_replace( '/[^a-z0-9:_-]/i', '', $position );
if ( is_wp_error($id) ) { if ( is_wp_error($id) ) {
$data = $id; $data = $id;

View File

@ -340,10 +340,10 @@ function get_comments_link() {
* *
* @since 0.71 * @since 0.71
* *
* @param string $file Not Used * @param string $deprecated Not Used
* @param bool $echo Not Used * @param bool $deprecated Not Used
*/ */
function comments_link( $file = '', $echo = true ) { function comments_link( $deprecated = '', $deprecated = '' ) {
echo get_comments_link(); echo get_comments_link();
} }
@ -357,6 +357,7 @@ function comments_link( $file = '', $echo = true ) {
* @return int The number of comments a post has * @return int The number of comments a post has
*/ */
function get_comments_number( $post_id = 0 ) { function get_comments_number( $post_id = 0 ) {
global $id;
$post_id = (int) $post_id; $post_id = (int) $post_id;
if ( !$post_id ) if ( !$post_id )
@ -536,9 +537,9 @@ function trackback_url($deprecated = true) {
* *
* @since 0.71 * @since 0.71
* *
* @param int $timezone Not used * @param int $deprecated Not used (Was $timezone = 0)
*/ */
function trackback_rdf($timezone = 0) { function trackback_rdf($deprecated = '') {
if (stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false) { if (stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false) {
echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"

View File

@ -105,7 +105,7 @@ function &get_comment(&$comment, $output = OBJECT) {
// Deprecate in favor of get_comment()? // Deprecate in favor of get_comment()?
function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) { // less flexible, but saves DB queries function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) { // less flexible, but saves DB queries
global $postc, $id, $wpdb; global $postc, $wpdb;
if ( $no_cache ) { if ( $no_cache ) {
$query = $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d", $comment_ID); $query = $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d", $comment_ID);
if ( false == $include_unapproved ) if ( false == $include_unapproved )
@ -130,7 +130,6 @@ function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = fals
function get_lastcommentmodified($timezone = 'server') { function get_lastcommentmodified($timezone = 'server') {
global $cache_lastcommentmodified, $wpdb; global $cache_lastcommentmodified, $wpdb;
$add_seconds_blog = get_option('gmt_offset') * 3600;
$add_seconds_server = date('Z'); $add_seconds_server = date('Z');
$now = current_time('mysql', 1); $now = current_time('mysql', 1);
if ( !isset($cache_lastcommentmodified[$timezone]) ) { if ( !isset($cache_lastcommentmodified[$timezone]) ) {
@ -177,7 +176,7 @@ function get_comment_count( $post_id = 0 ) {
"total_comments" => 0 "total_comments" => 0
); );
foreach ( $totals as $i => $row ) { foreach ( $totals as $row ) {
switch ( $row['comment_approved'] ) { switch ( $row['comment_approved'] ) {
case 'spam': case 'spam':
$comment_count['spam'] = $row['total']; $comment_count['spam'] = $row['total'];
@ -519,7 +518,7 @@ function wp_update_comment($commentarr) {
$comment_date_gmt = get_gmt_from_date($comment_date); $comment_date_gmt = get_gmt_from_date($comment_date);
$result = $wpdb->query( $wpdb->query(
"UPDATE $wpdb->comments SET "UPDATE $wpdb->comments SET
comment_content = '$comment_content', comment_content = '$comment_content',
comment_author = '$comment_author', comment_author = '$comment_author',
@ -609,7 +608,6 @@ function discover_pingback_server_uri($url, $timeout_bytes = 2048) {
$pingback_str_dquote = 'rel="pingback"'; $pingback_str_dquote = 'rel="pingback"';
$pingback_str_squote = 'rel=\'pingback\''; $pingback_str_squote = 'rel=\'pingback\'';
$x_pingback_str = 'x-pingback: '; $x_pingback_str = 'x-pingback: ';
$pingback_href_original_pos = 27;
extract(parse_url($url), EXTR_SKIP); extract(parse_url($url), EXTR_SKIP);

View File

@ -911,7 +911,7 @@ function permalink_link() {
* *
* @param string $file * @param string $file
*/ */
function permalink_single_rss($file = '') { function permalink_single_rss($deprecated = '') {
_deprecated_function(__FUNCTION__, '0.0', 'the_permalink_rss()'); _deprecated_function(__FUNCTION__, '0.0', 'the_permalink_rss()');
the_permalink_rss(); the_permalink_rss();
} }
@ -1206,7 +1206,7 @@ function comments_rss_link($link_text = 'Comments RSS', $deprecated = '') {
function get_category_rss_link($echo = false, $cat_ID = 1, $deprecated = '') { function get_category_rss_link($echo = false, $cat_ID = 1, $deprecated = '') {
_deprecated_function(__FUNCTION__, '0.0', 'get_category_feed_link()'); _deprecated_function(__FUNCTION__, '0.0', 'get_category_feed_link()');
$link = get_category_feed_link($cat_ID, $feed = 'rss2'); $link = get_category_feed_link($cat_ID, 'rss2');
if ( $echo ) if ( $echo )
echo $link; echo $link;
@ -1263,4 +1263,15 @@ function create_user($username, $password, $email) {
return wp_create_user($username, $password, $email); return wp_create_user($username, $password, $email);
} }
/**
* documentation_link() - Unused Admin function
* @since 2.0
* @param string $deprecated Unknown
* @deprecated 2.4
*/
function documentation_link( $deprecated = '' ) {
_deprecated_function( __FUNCTION__, '2.4', '' );
return;
}
?> ?>

View File

@ -115,7 +115,7 @@ function get_weekstartend( $mysqlstring, $start_of_week = '' ) {
$day = mktime( 0, 0, 0, $md, $mm, $my ); $day = mktime( 0, 0, 0, $md, $mm, $my );
$weekday = date( 'w', $day ); $weekday = date( 'w', $day );
$i = 86400; $i = 86400;
if( !is_numeric($a) ) if( !is_numeric($start_of_week) )
$start_of_week = get_option( 'start_of_week' ); $start_of_week = get_option( 'start_of_week' );
if ( $weekday < $start_of_week ) if ( $weekday < $start_of_week )

View File

@ -32,7 +32,7 @@ function permalink_anchor($mode = 'id') {
global $post; global $post;
switch ( strtolower($mode) ) { switch ( strtolower($mode) ) {
case 'title': case 'title':
$title = sanitize_title($post->post_title) . '-' . $id; $title = sanitize_title($post->post_title) . '-' . $post->ID;
echo '<a id="'.$title.'"></a>'; echo '<a id="'.$title.'"></a>';
break; break;
case 'id': case 'id':
@ -316,7 +316,7 @@ function get_author_feed_link( $author_id, $feed = '' ) {
if ( '' == $permalink_structure ) { if ( '' == $permalink_structure ) {
$link = get_option('home') . '?feed=rss2&amp;author=' . $author_id; $link = get_option('home') . '?feed=rss2&amp;author=' . $author_id;
} else { } else {
$link = get_author_posts_url($author_id, $author_nicename); $link = get_author_posts_url($author_id);
$link = trailingslashit($link) . user_trailingslashit('feed', 'feed'); $link = trailingslashit($link) . user_trailingslashit('feed', 'feed');
} }

View File

@ -291,8 +291,8 @@ function wp_mail( $to, $subject, $message, $headers = '' ) {
endif; endif;
if ( !function_exists('wp_login') ) : if ( !function_exists('wp_login') ) :
function wp_login($username, $password, $deprecated = false) { function wp_login($username, $password, $deprecated = '') {
global $wpdb, $error; global $error;
$username = sanitize_user($username); $username = sanitize_user($username);
@ -802,6 +802,7 @@ endif;
// Deprecated. Use wp_set_auth_cookie() // Deprecated. Use wp_set_auth_cookie()
if ( !function_exists('wp_setcookie') ) : if ( !function_exists('wp_setcookie') ) :
function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) { function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) {
_deprecated_function( __FUNCTION__, '2.4', 'wp_set_auth_cookie()' );
$user = get_userdatabylogin($username); $user = get_userdatabylogin($username);
wp_set_auth_cookie($user->ID, $remember); wp_set_auth_cookie($user->ID, $remember);
} }
@ -810,6 +811,7 @@ endif;
// Deprecated. Use wp_clear_auth_cookie() // Deprecated. Use wp_clear_auth_cookie()
if ( !function_exists('wp_clearcookie') ) : if ( !function_exists('wp_clearcookie') ) :
function wp_clearcookie() { function wp_clearcookie() {
_deprecated_function( __FUNCTION__, '2.4', 'wp_clear_auth_cookie()' );
wp_clear_auth_cookie(); wp_clear_auth_cookie();
} }
endif; endif;
@ -817,6 +819,7 @@ endif;
// Deprecated. No alternative. // Deprecated. No alternative.
if ( !function_exists('wp_get_cookie_login') ): if ( !function_exists('wp_get_cookie_login') ):
function wp_get_cookie_login() { function wp_get_cookie_login() {
_deprecated_function( __FUNCTION__, '2.4', '' );
return false; return false;
} }
endif; endif;

View File

@ -2563,7 +2563,7 @@ function _transition_post_status($new_status, $old_status, $post) {
* @param int $post_id Not Used. Can be set to null. * @param int $post_id Not Used. Can be set to null.
* @param object $post Object type containing the post information * @param object $post Object type containing the post information
*/ */
function _future_post_hook($post_id, $post) { function _future_post_hook($deprecated = '', $post) {
wp_clear_scheduled_hook( 'publish_future_post', $post->ID ); wp_clear_scheduled_hook( 'publish_future_post', $post->ID );
wp_schedule_single_event(strtotime($post->post_date_gmt. ' GMT'), 'publish_future_post', array($post->ID)); wp_schedule_single_event(strtotime($post->post_date_gmt. ' GMT'), 'publish_future_post', array($post->ID));
} }

View File

@ -806,7 +806,7 @@ function sanitize_term_field($field, $value, $term_id, $taxonomy, $context) {
} else if ( 'rss' == $context ) { } else if ( 'rss' == $context ) {
$value = apply_filters("term_${field}_rss", $value, $taxonomy); $value = apply_filters("term_${field}_rss", $value, $taxonomy);
$value = apply_filters("${taxonomy}_$field_rss", $value); $value = apply_filters("${taxonomy}_${field}_rss", $value);
} else { } else {
// Use display filters by default. // Use display filters by default.
$value = apply_filters("term_$field", $value, $term_id, $taxonomy, $context); $value = apply_filters("term_$field", $value, $term_id, $taxonomy, $context);