Set WCA pages as top level in navigation if no parent exists (https://github.com/woocommerce/woocommerce-admin/pull/5456)

This commit is contained in:
Joshua T Flowers 2020-10-22 14:42:49 -04:00 committed by GitHub
parent d8c4297e28
commit fbdce6cd4e
1 changed files with 2 additions and 2 deletions

View File

@ -485,8 +485,8 @@ class PageController {
'title' => $options['title'],
'capability' => $options['capability'],
'url' => $options['path'],
'order' => isset( $options['order'] ) ? $options['order'] : 20,
'is_top_level' => isset( $options['is_top_level'] ) && $options['is_top_level'],
'order' => isset( $options['order'] ) ? $options['order'] : 100,
'is_top_level' => ( isset( $options['is_top_level'] ) && $options['is_top_level'] ) || ! $options['parent'],
);
if ( isset( $options['is_category'] ) && $options['is_category'] ) {