Make WordPress Core

Changeset 28274


Ignore:
Timestamp:
05/06/2014 04:57:22 AM (11 years ago)
Author:
wonderboymusic
Message:

In general-template.php - remove dead code:

  • In get_calendar(), $cache is set twice. The first is useless.
  • In wp_default_editor(), $user is (accidentally) assigned in a condition. Since it is never used, this is unnecessary.
  • In language_attributes(), $output is set twice before it is ever used. The first is unnecessary.
  • In paginate_links(), $n is set twice before it is ever used. The first is unnecessary.

See #27882.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r28251 r28274  
    13891389    global $wpdb, $m, $monthnum, $year, $wp_locale, $posts;
    13901390
    1391     $cache = array();
    13921391    $key = md5( $m . $monthnum . $year );
    13931392    if ( $cache = wp_cache_get( 'get_calendar', 'calendar' ) ) {
     
    22452244function wp_default_editor() {
    22462245    $r = user_can_richedit() ? 'tinymce' : 'html'; // defaults
    2247     if ( $user = wp_get_current_user() ) { // look for cookie
     2246    if ( wp_get_current_user() ) { // look for cookie
    22482247        $ed = get_user_setting('editor', 'tinymce');
    22492248        $r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r;
     
    23462345function language_attributes($doctype = 'html') {
    23472346    $attributes = array();
    2348     $output = '';
    23492347
    23502348    if ( function_exists( 'is_rtl' ) && is_rtl() )
     
    24542452    $r = '';
    24552453    $page_links = array();
    2456     $n = 0;
    24572454    $dots = false;
    24582455
Note: See TracChangeset for help on using the changeset viewer.