wp-includes/blocks/home-link.php:107Renders the core/home-link block.
$attributesarray$contentstring$blockWP_Blockstringfunction render_block_core_home_link( $attributes, $content, $block ) { if ( empty( $attributes['label'] ) ) { $attributes['label'] = __( 'Home' ); } $aria_current = ''; if ( is_front_page() ) { $aria_current = ' aria-current="page"'; } elseif ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) { // Edge case where the Reading settings has a posts page set but not a static homepage. $aria_current = ' aria-current="page"'; } $target = ''; if ( isset( $attributes['opensInNewTab'] ) && true === $attributes['opensInNewTab'] ) { $target = ' target="_blank"'; } $description = ''; if ( ! empty( $attributes['description'] ) ) { $description = '<span class="wp-block-navigation-item__description">' . wp_kses_post( $attributes['description'] ) . '</span>'; } return sprintf( '<li %1$s><a class="wp-block-home-link__content wp-block-navigation-item__content" href="%2$s" rel="home" %3$s%4$s>%5$s%6$s</a></li>', block_core_home_link_build_li_wrapper_attributes( $block->context ), esc_url( home_url() ), $target, $aria_current, wp_kses_post( $attributes['label'] ), $description );}Introduced in 6.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/blocks/home-link.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.