library/Helper/NavigationTree.php
public function shouldBeIncluded($item)
    {
        if (!is_object($item)) {
            return false;
        }

        $pageId = $this->getPageId($item);
        $showInMenu = get_field('hide_in_menu', $pageId) ? !get_field('hide_in_menu', $pageId) : true;
        $isNotTopLevelItem = !($item->post_type === 'page' && isset($item->post_parent) && $item->post_parent === 0);
        $showTopLevel = $this->args['include_top_level'];

        return ($showTopLevel || $isNotTopLevelItem) && $showInMenu;
    }
public function shouldBeIncluded($item)
    {
        if (!is_object($item)) {
            return false;
        }

        $pageId = $this->getPageId($item);
        $showInMenu = get_field('hide_in_menu', $pageId) ? !get_field('hide_in_menu', $pageId) : true;
        $isNotTopLevelItem = !($item->post_type === 'page' && isset($item->post_parent) && $item->post_parent === 0);
        $showTopLevel = $this->args['include_top_level'];

        return ($showTopLevel || $isNotTopLevelItem) && $showInMenu;
    }
public function shouldBeIncluded ( $ item ) { if ( ! is_object ( $ item ) ) { return false ; } $ pageId = $ this -> getPageId ( $ item ) ; $ showInMenu = get_field ( 'hide_in_menu' , $ pageId ) ? ! get_field ( 'hide_in_menu' , $ pageId ) : true ; $ isNotTopLevelItem = ! ( $ item -> post_type === 'page' && isset ( $ item -> post_parent ) && $ item -> post_parent === 0 ) ; $ showTopLevel = $ this -> args [ 'include_top_level' ] ; return ( $ showTopLevel || $ isNotTopLevelItem ) && $ showInMenu ; }
Datermines if page should be included in the menu or not
@param  object $item The menu item
@return boolean
Datermines if page should be included in the menu or not