Changeset 6551

Show
Ignore:
Timestamp:
01/04/08 19:36:34 (8 months ago)
Author:
ryan
Message:

Unused var cleanup. Props DD32. see #5418

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/custom-header.php

    r6363 r6551  
    229229        if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) { 
    230230            set_theme_mod('header_image', clean_url($url)); 
    231             apply_filters('wp_create_file_in_uploads', $file, $id); // For replication 
     231            do_action('wp_create_file_in_uploads', $file, $id); // For replication 
    232232            return $this->finished(); 
    233233        } elseif ( $width > HEADER_IMAGE_WIDTH ) { 
  • trunk/wp-admin/import/wordpress.php

    r6532 r6551  
    107107                } 
    108108                if ( false !== strpos($importline, '</item>') ) { 
    109                     $num++; 
    110109                    $doing_entry = false; 
    111110                    if ($process_post_func) 
     
    401400            $post_author = $this->checkauthor($post_author); //just so that if a post already exists, new users are not created by checkauthor 
    402401 
    403             $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'); 
     402            $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'); 
    404403            if ($post_type == 'attachment') { 
    405404                $remote_url = $this->get_tag( $post, 'wp:attachment_url' ); 
  • trunk/wp-admin/import/wp-cat2tag.php

    r6394 r6551  
    115115 
    116116    function _category_exists($cat_id) { 
    117         global $wpdb; 
    118  
    119117        $cat_id = (int) $cat_id; 
    120118 
  • trunk/wp-admin/includes/file.php

    r6520 r6551  
    113113    // If you override this, you must provide $ext and $type!!!! 
    114114    $test_type = true; 
     115    $mimes = false; 
    115116 
    116117    // Install user overrides. Did we mention that this voids your warranty? 
  • trunk/wp-admin/includes/misc.php

    r6387 r6551  
    131131// If siteurl or home changed, flush rewrite rules. 
    132132function update_home_siteurl( $old_value, $value ) { 
    133     global $wp_rewrite, $user_login, $user_pass_md5
     133    global $wp_rewrite
    134134 
    135135    if ( defined( "WP_INSTALLING" ) ) 
  • trunk/wp-admin/includes/template.php

    r6544 r6551  
    101101    if ( $checked == $current) 
    102102        echo ' checked="checked"'; 
    103 } 
    104  
    105 // TODO: Remove? 
    106 function documentation_link( $for ) { 
    107     return; 
    108103} 
    109104 
  • trunk/wp-admin/includes/update.php

    r6151 r6551  
    33// The admin side of our 1.0 update system 
    44 
    5 function core_update_footer( $msg ) { 
     5function core_update_footer( $msg = '' ) { 
    66    if ( !current_user_can('manage_options') ) 
    77        return sprintf( '| '.__( 'Version %s' ), $GLOBALS['wp_version'] ); 
  • trunk/wp-admin/link-import.php

    r6230 r6551  
    124124 
    125125if ( ! $blogrolling ) 
    126     apply_filters( 'wp_delete_file', $opml_url); 
     126    do_action( 'wp_delete_file', $opml_url); 
    127127    @unlink($opml_url); 
    128128?> 
  • trunk/wp-app.php

    r6507 r6551  
    426426        $file = $file['file']; 
    427427 
    428         apply_filters('wp_create_file_in_uploads', $file); // replicate 
     428        do_action('wp_create_file_in_uploads', $file); // replicate 
    429429 
    430430        // Construct the attachment array 
  • trunk/wp-includes/category-template.php

    r6365 r6551  
    6767 
    6868function get_the_category($id = false) { 
    69     global $post, $term_cache
     69    global $post
    7070 
    7171    $id = (int) $id; 
  • trunk/wp-includes/classes.php

    r6456 r6551  
    741741        $r = wp_parse_args( $args, $defaults ); 
    742742        extract( $r, EXTR_SKIP ); 
    743         $postition = preg_replace( '/[^a-z0-9:_-]/i', '', $position ); 
     743        $position = preg_replace( '/[^a-z0-9:_-]/i', '', $position ); 
    744744 
    745745        if ( is_wp_error($id) ) { 
  • trunk/wp-includes/comment-template.php

    r6495 r6551  
    341341 * @since 0.71 
    342342 * 
    343  * @param string $file Not Used 
    344  * @param bool $echo Not Used 
    345  */ 
    346 function comments_link( $file = '', $echo = true ) { 
     343 * @param string $deprecated Not Used 
     344 * @param bool $deprecated Not Used 
     345 */ 
     346function comments_link( $deprecated = '', $deprecated = '' ) { 
    347347    echo get_comments_link(); 
    348348} 
     
    358358 */ 
    359359function get_comments_number( $post_id = 0 ) { 
     360    global $id; 
    360361    $post_id = (int) $post_id; 
    361362 
     
    537538 * @since 0.71 
    538539 * 
    539  * @param int $timezone Not used 
    540  */ 
    541 function trackback_rdf($timezone = 0) { 
     540 * @param int $deprecated Not used (Was $timezone = 0) 
     541 */ 
     542function trackback_rdf($deprecated = '') { 
    542543    if (stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false) { 
    543544        echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
  • trunk/wp-includes/comment.php

    r6534 r6551  
    106106// Deprecate in favor of get_comment()? 
    107107function get_commentdata( $comment_ID, $no_cache = 0, $include_unapproved = false ) { // less flexible, but saves DB queries 
    108     global $postc, $id, $wpdb; 
     108    global $postc, $wpdb; 
    109109    if ( $no_cache ) { 
    110110        $query = $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d", $comment_ID); 
     
    131131function get_lastcommentmodified($timezone = 'server') { 
    132132    global $cache_lastcommentmodified, $wpdb; 
    133     $add_seconds_blog = get_option('gmt_offset') * 3600; 
    134133    $add_seconds_server = date('Z'); 
    135134    $now = current_time('mysql', 1); 
     
    178177    );  
    179178 
    180     foreach ( $totals as $i => $row ) {  
     179    foreach ( $totals as $row ) {  
    181180        switch ( $row['comment_approved'] ) {  
    182181            case 'spam':  
     
    520519    $comment_date_gmt = get_gmt_from_date($comment_date); 
    521520 
    522     $result = $wpdb->query( 
     521    $wpdb->query( 
    523522        "UPDATE $wpdb->comments SET 
    524523            comment_content      = '$comment_content', 
     
    610609    $pingback_str_squote = 'rel=\'pingback\''; 
    611610    $x_pingback_str = 'x-pingback: '; 
    612     $pingback_href_original_pos = 27; 
    613611 
    614612    extract(parse_url($url), EXTR_SKIP); 
  • trunk/wp-includes/deprecated.php

    r6517 r6551  
    912912 * @param string $file 
    913913 */ 
    914 function permalink_single_rss($file = '') { 
     914function permalink_single_rss($deprecated = '') { 
    915915    _deprecated_function(__FUNCTION__, '0.0', 'the_permalink_rss()'); 
    916916    the_permalink_rss(); 
     
    12071207    _deprecated_function(__FUNCTION__, '0.0', 'get_category_feed_link()'); 
    12081208 
    1209     $link = get_category_feed_link($cat_ID, $feed = 'rss2'); 
     1209    $link = get_category_feed_link($cat_ID, 'rss2'); 
    12101210 
    12111211    if ( $echo ) 
     
    12641264} 
    12651265 
     1266/** 
     1267 * documentation_link() - Unused Admin function 
     1268 * @since 2.0 
     1269 * @param string $deprecated Unknown 
     1270 * @deprecated 2.4 
     1271 */ 
     1272function documentation_link( $deprecated = '' ) { 
     1273    _deprecated_function( __FUNCTION__, '2.4', '' ); 
     1274    return; 
     1275} 
     1276 
    12661277?> 
  • trunk/wp-includes/functions.php

    r6546 r6551  
    116116    $weekday = date( 'w', $day ); 
    117117    $i = 86400; 
    118     if( !is_numeric($a) ) 
     118    if( !is_numeric($start_of_week) ) 
    119119        $start_of_week = get_option( 'start_of_week' ); 
    120120 
  • trunk/wp-includes/link-template.php

    r6415 r6551  
    3333    switch ( strtolower($mode) ) { 
    3434        case 'title': 
    35             $title = sanitize_title($post->post_title) . '-' . $id
     35            $title = sanitize_title($post->post_title) . '-' . $post->ID
    3636            echo '<a id="'.$title.'"></a>'; 
    3737            break; 
     
    317317        $link = get_option('home') . '?feed=rss2&amp;author=' . $author_id; 
    318318    } else { 
    319         $link = get_author_posts_url($author_id, $author_nicename); 
     319        $link = get_author_posts_url($author_id); 
    320320        $link = trailingslashit($link) . user_trailingslashit('feed', 'feed'); 
    321321    } 
  • trunk/wp-includes/pluggable.php

    r6531 r6551  
    292292 
    293293if ( !function_exists('wp_login') ) : 
    294 function wp_login($username, $password, $deprecated = false) { 
    295     global $wpdb, $error; 
     294function wp_login($username, $password, $deprecated = '') { 
     295    global $error; 
    296296 
    297297    $username = sanitize_user($username); 
     
    803803if ( !function_exists('wp_setcookie') ) : 
    804804function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) { 
     805    _deprecated_function( __FUNCTION__, '2.4', 'wp_set_auth_cookie()' ); 
    805806    $user = get_userdatabylogin($username); 
    806807    wp_set_auth_cookie($user->ID, $remember); 
     
    811812if ( !function_exists('wp_clearcookie') ) : 
    812813function wp_clearcookie() { 
     814    _deprecated_function( __FUNCTION__, '2.4', 'wp_clear_auth_cookie()' ); 
    813815    wp_clear_auth_cookie(); 
    814816} 
     
    818820if ( !function_exists('wp_get_cookie_login') ): 
    819821function wp_get_cookie_login() { 
     822    _deprecated_function( __FUNCTION__, '2.4', '' ); 
    820823    return false; 
    821824} 
  • trunk/wp-includes/post.php

    r6546 r6551  
    25642564 * @param object $post Object type containing the post information 
    25652565 */ 
    2566 function _future_post_hook($post_id, $post) { 
     2566function _future_post_hook($deprecated = '', $post) { 
    25672567    wp_clear_scheduled_hook( 'publish_future_post', $post->ID ); 
    25682568    wp_schedule_single_event(strtotime($post->post_date_gmt. ' GMT'), 'publish_future_post', array($post->ID)); 
  • trunk/wp-includes/taxonomy.php

    r6424 r6551  
    807807    } else if ( 'rss' == $context ) { 
    808808        $value = apply_filters("term_${field}_rss", $value, $taxonomy); 
    809         $value = apply_filters("${taxonomy}_$field_rss", $value); 
     809        $value = apply_filters("${taxonomy}_${field}_rss", $value); 
    810810    } else { 
    811811        // Use display filters by default.