WordPress.org

Make WordPress Core

Changeset 42378


Ignore:
Timestamp:
12/07/2017 02:49:10 PM (6 months ago)
Author:
SergeyBiryukov
Message:

Permalinks: Remove unnecesary temporary variable in get_permalink().

Props JPry, danimalbrown.
Fixes #41981.

File:
1 edited

Legend:

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

    r42343 r42378  
    192192                $category_object = get_term( $category_object, 'category' );
    193193                $category        = $category_object->slug;
    194                 if ( $parent = $category_object->parent ) {
    195                     $category = get_category_parents( $parent, false, '/', true ) . $category;
     194                if ( $category_object->parent ) {
     195                    $category = get_category_parents( $category_object->parent, false, '/', true ) . $category;
    196196                }
    197197            }
Note: See TracChangeset for help on using the changeset viewer.