Ticket #20903: 20903.diff
File 20903.diff, 808 bytes (added by , 12 years ago) |
---|
-
wp-admin/includes/export.php
94 94 95 95 // put categories in order with no child going before its parent 96 96 while ( $cat = array_shift( $categories ) ) { 97 if ( $cat->parent == 0 || isset( $cats[$cat->parent] ) ) 97 if ( $cat->parent == 0 || isset( $cats[$cat->parent] ) ) { 98 98 $cats[$cat->term_id] = $cat; 99 else 99 } elseif ( term_exists( $cat->parent, 'category' ) ) { 100 // Assume we will find the parent later 100 101 $categories[] = $cat; 102 } else { 103 // For some reason the parent is missing 104 $cats[$cat->term_id] = $cat; 105 } 101 106 } 102 107 103 108 // put terms in order with no child going before its parent