WordPress.org

Make WordPress Core

Changeset 28304


Ignore:
Timestamp:
05/06/2014 05:20:10 PM (8 years ago)
Author:
wonderboymusic
Message:

In wp-admin/includes/update.php, remove dead code:

  • In get_core_checksums(), $return is set and never used.
  • In core_update_footer(), break is unnecessary and unreachable after return.
  • In get_theme_updates(), $themes is set and never used.
  • In wp_theme_update_row(), $theme_name is the only user of $themes_allowedtags... neither are used.

See #27882.

File:
1 edited

Legend:

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

    r28145 r28304  
    102102 */
    103103function get_core_checksums( $version, $locale ) {
    104     $return = array();
    105 
    106104    $url = $http_url = 'http://api.wordpress.org/core/checksums/1.0/?' . http_build_query( compact( 'version', 'locale' ), null, '&' );
    107105
     
    182180    case 'development' :
    183181        return sprintf( __( 'You are using a development version (%1$s). Cool! Please <a href="%2$s">stay updated</a>.' ), get_bloginfo( 'version', 'display' ), network_admin_url( 'update-core.php' ) );
    184     break;
    185182
    186183    case 'upgrade' :
    187184        return sprintf( '<strong>'.__( '<a href="%1$s">Get Version %2$s</a>' ).'</strong>', network_admin_url( 'update-core.php' ), $cur->current);
    188     break;
    189185
    190186    case 'latest' :
    191187    default :
    192188        return sprintf( __( 'Version %s' ), get_bloginfo( 'version', 'display' ) );
    193     break;
    194189    }
    195190}
     
    333328
    334329function get_theme_updates() {
    335     $themes = wp_get_themes();
    336330    $current = get_site_transient('update_themes');
    337331
     
    368362        return false;
    369363    $r = $current->response[ $theme_key ];
    370     $themes_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array());
    371     $theme_name = wp_kses( $theme['Name'], $themes_allowedtags );
    372364
    373365    $details_url = add_query_arg( array( 'TB_iframe' => 'true', 'width' => 1024, 'height' => 800 ), $current->response[ $theme_key ]['url'] );
Note: See TracChangeset for help on using the changeset viewer.