From 65c382d55068cacc0b5be3b80e291c35e14fe979 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 28 May 2015 05:51:25 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@32632 git-svn-id: http://core.svn.wordpress.org/trunk@32602 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-filters.php | 8 ++++---- wp-includes/theme.php | 5 +++-- wp-includes/version.php | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index 7bf03885f1..c67962d7cf 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -92,7 +92,7 @@ foreach ( array( 'content_save_pre', 'excerpt_save_pre', 'comment_save_pre', 'pr // Format strings for display. foreach ( array( 'comment_author', 'term_name', 'link_name', 'link_description', 'link_notes', 'bloginfo', 'wp_title', 'widget_title' ) as $filter ) { - add_filter( $filter, 'wptexturize' ); + // add_filter( $filter, 'wptexturize' ); add_filter( $filter, 'convert_chars' ); add_filter( $filter, 'esc_html' ); } @@ -104,13 +104,13 @@ add_filter( 'comment_text', 'capital_P_dangit', 31 ); // Format titles foreach ( array( 'single_post_title', 'single_cat_title', 'single_tag_title', 'single_month_title', 'nav_menu_attr_title', 'nav_menu_description' ) as $filter ) { - add_filter( $filter, 'wptexturize' ); + // add_filter( $filter, 'wptexturize' ); add_filter( $filter, 'strip_tags' ); } // Format text area for display. foreach ( array( 'term_description' ) as $filter ) { - add_filter( $filter, 'wptexturize' ); + // add_filter( $filter, 'wptexturize' ); add_filter( $filter, 'convert_chars' ); add_filter( $filter, 'wpautop' ); add_filter( $filter, 'shortcode_unautop'); @@ -142,7 +142,7 @@ add_filter( 'the_excerpt', 'wpautop' ); add_filter( 'the_excerpt', 'shortcode_unautop'); add_filter( 'get_the_excerpt', 'wp_trim_excerpt' ); -add_filter( 'comment_text', 'wptexturize' ); +// add_filter( 'comment_text', 'wptexturize' ); add_filter( 'comment_text', 'convert_chars' ); add_filter( 'comment_text', 'make_clickable', 9 ); add_filter( 'comment_text', 'force_balance_tags', 25 ); diff --git a/wp-includes/theme.php b/wp-includes/theme.php index 17b64812e9..84f591467c 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -900,7 +900,8 @@ function validate_current_theme() { */ function get_theme_mods() { $theme_slug = get_option( 'stylesheet' ); - if ( false === ( $mods = get_option( "theme_mods_$theme_slug" ) ) ) { + $mods = get_option( "theme_mods_$theme_slug" ); + if ( false === $mods ) { $theme_name = get_option( 'current_theme' ); if ( false === $theme_name ) $theme_name = wp_get_theme()->get('Name'); @@ -909,8 +910,8 @@ function get_theme_mods() { update_option( "theme_mods_$theme_slug", $mods ); delete_option( "mods_$theme_name" ); } - return $mods; } + return $mods; } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index caebfdbac3..a70eb948bb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32631'; +$wp_version = '4.3-alpha-32632'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.