WordPress.org

Make WordPress Core

Changeset 32632


Ignore:
Timestamp:
05/28/2015 05:50:40 AM (7 years ago)
Author:
nacin
Message:

Fix return error in get_theme_mods() from [32629].

Split a line with both an assignment and a conditional, not to mention an interpolated variable. Lots going on, easy mistake to make.

props BrianLayman.
fixes #32516.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r32589 r32632  
    9393// Format strings for display.
    9494foreach ( array( 'comment_author', 'term_name', 'link_name', 'link_description', 'link_notes', 'bloginfo', 'wp_title', 'widget_title' ) as $filter ) {
    95     add_filter( $filter, 'wptexturize'   );
     95    // add_filter( $filter, 'wptexturize'   );
    9696    add_filter( $filter, 'convert_chars' );
    9797    add_filter( $filter, 'esc_html'      );
     
    105105// Format titles
    106106foreach ( array( 'single_post_title', 'single_cat_title', 'single_tag_title', 'single_month_title', 'nav_menu_attr_title', 'nav_menu_description' ) as $filter ) {
    107     add_filter( $filter, 'wptexturize' );
     107    // add_filter( $filter, 'wptexturize' );
    108108    add_filter( $filter, 'strip_tags'  );
    109109}
     
    111111// Format text area for display.
    112112foreach ( array( 'term_description' ) as $filter ) {
    113     add_filter( $filter, 'wptexturize'      );
     113    // add_filter( $filter, 'wptexturize'      );
    114114    add_filter( $filter, 'convert_chars'    );
    115115    add_filter( $filter, 'wpautop'          );
     
    143143add_filter( 'get_the_excerpt', 'wp_trim_excerpt'  );
    144144
    145 add_filter( 'comment_text', 'wptexturize'            );
     145// add_filter( 'comment_text', 'wptexturize'            );
    146146add_filter( 'comment_text', 'convert_chars'          );
    147147add_filter( 'comment_text', 'make_clickable',      9 );
  • trunk/src/wp-includes/theme.php

    r32629 r32632  
    901901function get_theme_mods() {
    902902    $theme_slug = get_option( 'stylesheet' );
    903     if ( false === ( $mods = get_option( "theme_mods_$theme_slug" ) ) ) {
     903    $mods = get_option( "theme_mods_$theme_slug" );
     904    if ( false === $mods ) {
    904905        $theme_name = get_option( 'current_theme' );
    905906        if ( false === $theme_name )
     
    910911            delete_option( "mods_$theme_name" );
    911912        }
    912         return $mods;
    913     }
     913    }
     914    return $mods;
    914915}
    915916
Note: See TracChangeset for help on using the changeset viewer.