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
This commit is contained in:
Sergey Biryukov 2015-10-20 16:12:21 +00:00
parent 0a614515ac
commit 1940317385
1 changed files with 5 additions and 1 deletions

View File

@ -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 );