From 1940317385046386ea29065666776946504ae5aa Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 20 Oct 2015 16:12:21 +0000 Subject: [PATCH] In `wp_list_categories()`, rewrite a long condition for clarity. See #34363. git-svn-id: https://develop.svn.wordpress.org/trunk@35293 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/category-template.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php index 3194ff3d2c..9b685edb11 100644 --- a/src/wp-includes/category-template.php +++ b/src/wp-includes/category-template.php @@ -606,7 +606,11 @@ function wp_list_categories( $args = '' ) { // Fallback for the 'All' link is the posts page. if ( ! $posts_page ) { - $posts_page = 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ? get_permalink( get_option( 'page_for_posts' ) ) : home_url( '/' ); + if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) { + $posts_page = get_permalink( get_option( 'page_for_posts' ) ); + } else { + $posts_page = home_url( '/' ); + } } $posts_page = esc_url( $posts_page );