post_title ? $post->post_title : "#{$post_id} (no title)"; $permalink = get_permalink( $post_id ); return << {$title} ITEM; } function get_page_breadcrumbs( $post_id ) { require_once get_template_directory() . '/inc/pages-index/class-pages-index.php'; $ancestor_ids = array_reverse( get_post_ancestors( $post_id ) ); $breadcrumbs = array_map( __NAMESPACE__ . '\format_breadcrumbs', $ancestor_ids ); $breadcrumbs_html = implode( $breadcrumbs ); $pages_index_url = esc_url( Pages_Index\Pages_Index::get_pages_index_url() ); $pages_index_label = esc_html( __( 'Pages', 'p2020' ) ); return << BREADCRUMBS; }