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. Built from https://develop.svn.wordpress.org/trunk@31217 git-svn-id: http://core.svn.wordpress.org/trunk@31198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7c5038feb6
commit
0f6d0b84d1
|
@ -805,9 +805,6 @@ function delete_plugins( $plugins, $deprecated = '' ) {
|
||||||
|
|
||||||
$plugins_dir = trailingslashit( $plugins_dir );
|
$plugins_dir = trailingslashit( $plugins_dir );
|
||||||
|
|
||||||
$translations_dir = $wp_filesystem->wp_lang_dir();
|
|
||||||
$translations_dir = trailingslashit( $translations_dir );
|
|
||||||
|
|
||||||
$plugin_translations = wp_get_installed_translations( 'plugins' );
|
$plugin_translations = wp_get_installed_translations( 'plugins' );
|
||||||
|
|
||||||
$errors = array();
|
$errors = array();
|
||||||
|
|
|
@ -69,9 +69,6 @@ function delete_theme($stylesheet, $redirect = '') {
|
||||||
return new WP_Error( 'could_not_remove_theme', sprintf( __( 'Could not fully remove the theme %s.' ), $stylesheet ) );
|
return new WP_Error( 'could_not_remove_theme', sprintf( __( 'Could not fully remove the theme %s.' ), $stylesheet ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
$translations_dir = $wp_filesystem->wp_lang_dir();
|
|
||||||
$translations_dir = trailingslashit( $translations_dir );
|
|
||||||
|
|
||||||
$theme_translations = wp_get_installed_translations( 'themes' );
|
$theme_translations = wp_get_installed_translations( 'themes' );
|
||||||
|
|
||||||
// Remove language files, silently.
|
// Remove language files, silently.
|
||||||
|
|
|
@ -391,7 +391,6 @@ class WP_Date_Query {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Throw a notice for each failing value.
|
// Throw a notice for each failing value.
|
||||||
$is_between = true;
|
|
||||||
foreach ( (array) $date_query[ $key ] as $_value ) {
|
foreach ( (array) $date_query[ $key ] as $_value ) {
|
||||||
$is_between = $_value >= $check['min'] && $_value <= $check['max'];
|
$is_between = $_value >= $check['min'] && $_value <= $check['max'];
|
||||||
|
|
||||||
|
|
|
@ -1805,10 +1805,12 @@ function global_terms( $term_id, $deprecated = '' ) {
|
||||||
}
|
}
|
||||||
} elseif ( $global_id != $term_id ) {
|
} elseif ( $global_id != $term_id ) {
|
||||||
$local_id = $wpdb->get_row( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE term_id = %d", $global_id ) );
|
$local_id = $wpdb->get_row( $wpdb->prepare( "SELECT term_id FROM $wpdb->terms WHERE term_id = %d", $global_id ) );
|
||||||
if ( null != $local_id )
|
if ( null != $local_id ) {
|
||||||
$local_id = global_terms( $local_id );
|
global_terms( $local_id );
|
||||||
if ( 10 < $global_terms_recurse )
|
if ( 10 < $global_terms_recurse ) {
|
||||||
$global_id = $term_id;
|
$global_id = $term_id;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $global_id != $term_id ) {
|
if ( $global_id != $term_id ) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.2-alpha-31216';
|
$wp_version = '4.2-alpha-31217';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
|
@ -273,7 +273,7 @@ class WP_Text_Diff_Renderer_Table extends Text_Diff_Renderer {
|
||||||
$diff = $renderer->render( $text_diff );
|
$diff = $renderer->render( $text_diff );
|
||||||
|
|
||||||
// If they're too different, don't include any <ins> or <dels>
|
// If they're too different, don't include any <ins> or <dels>
|
||||||
if ( $diff_count = preg_match_all( '!(<ins>.*?</ins>|<del>.*?</del>)!', $diff, $diff_matches ) ) {
|
if ( preg_match_all( '!(<ins>.*?</ins>|<del>.*?</del>)!', $diff, $diff_matches ) ) {
|
||||||
// length of all text between <ins> or <del>
|
// length of all text between <ins> or <del>
|
||||||
$stripped_matches = strlen(strip_tags( join(' ', $diff_matches[0]) ));
|
$stripped_matches = strlen(strip_tags( join(' ', $diff_matches[0]) ));
|
||||||
// since we count lengith of text between <ins> or <del> (instead of picking just one),
|
// since we count lengith of text between <ins> or <del> (instead of picking just one),
|
||||||
|
|
Loading…
Reference in New Issue