Make WordPress Core

Changeset 31217


Ignore:
Timestamp:
01/16/2015 09:18:52 PM (10 years ago)
Author:
wonderboymusic
Message:

Remove unused local vars in delete_plugins(), delete_theme(), WP_Date_Query->validate_date_values(), global_terms(), and WP_Text_Diff_Renderer_Table->_changed().

This will clear out the "Unused Code" label in the next Scrutinizer report.

See #30799.

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin.php

    r31106 r31217  
    806806    $plugins_dir = trailingslashit( $plugins_dir );
    807807
    808     $translations_dir = $wp_filesystem->wp_lang_dir();
    809     $translations_dir = trailingslashit( $translations_dir );
    810 
    811808    $plugin_translations = wp_get_installed_translations( 'plugins' );
    812809
  • trunk/src/wp-admin/includes/theme.php

    r31188 r31217  
    6969        return new WP_Error( 'could_not_remove_theme', sprintf( __( 'Could not fully remove the theme %s.' ), $stylesheet ) );
    7070    }
    71 
    72     $translations_dir = $wp_filesystem->wp_lang_dir();
    73     $translations_dir = trailingslashit( $translations_dir );
    7471
    7572    $theme_translations = wp_get_installed_translations( 'themes' );
  • trunk/src/wp-includes/date.php

    r31179 r31217  
    392392
    393393            // Throw a notice for each failing value.
    394             $is_between = true;
    395394            foreach ( (array) $date_query[ $key ] as $_value ) {
    396395                $is_between = $_value >= $check['min'] && $_value <= $check['max'];
  • trunk/src/wp-includes/ms-functions.php

    r31188 r31217  
    18061806    } elseif ( $global_id != $term_id ) {
    18071807        $local_id = $wpdb->get_row( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE term_id = %d", $global_id ) );
    1808         if ( null != $local_id )
    1809             $local_id = global_terms( $local_id );
    1810             if ( 10 < $global_terms_recurse )
     1808        if ( null != $local_id ) {
     1809            global_terms( $local_id );
     1810            if ( 10 < $global_terms_recurse ) {
    18111811                $global_id = $term_id;
     1812            }
     1813        }
    18121814    }
    18131815
  • trunk/src/wp-includes/wp-diff.php

    r31135 r31217  
    274274
    275275                // If they're too different, don't include any <ins> or <dels>
    276                 if ( $diff_count = preg_match_all( '!(<ins>.*?</ins>|<del>.*?</del>)!', $diff, $diff_matches ) ) {
     276                if ( preg_match_all( '!(<ins>.*?</ins>|<del>.*?</del>)!', $diff, $diff_matches ) ) {
    277277                    // length of all text between <ins> or <del>
    278278                    $stripped_matches = strlen(strip_tags( join(' ', $diff_matches[0]) ));
Note: See TracChangeset for help on using the changeset viewer.