Fixes undefined error on breadcrumb.

This commit is contained in:
mateuswetah 2022-01-27 17:23:09 -03:00
parent f9594a2836
commit 8ff6b58934
2 changed files with 8 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -87,11 +87,13 @@ function tainacan_interface_the_breadcrumb() {
echo '<a href="'. esc_url(get_post_type_archive_link('tainacan-collection')) .'">'; echo '<a href="'. esc_url(get_post_type_archive_link('tainacan-collection')) .'">';
_e( 'Collections', 'tainacan-interface' ); _e( 'Collections', 'tainacan-interface' );
echo '</a>&nbsp;' . $delimiter . '&nbsp;'; echo '</a>&nbsp;' . $delimiter . '&nbsp;';
$str = '';
if (is_post_type_archive()) { if ( ($post_type) ) {
$str = $post_type->labels->singular_name; if (is_post_type_archive()) {
} else { $str = $post_type->labels->singular_name;
$str = __('All items', 'tainacan-interface'); } else {
$str = __('All items', 'tainacan-interface');
}
} }
echo $before . $str . $after; echo $before . $str . $after;
} else { } else {