wp-includes/admin-bar.php:777Provides a shortlink.
$wp_admin_barWP_Admin_Barfunction wp_admin_bar_shortlink_menu( $wp_admin_bar ) { $short = wp_get_shortlink( 0, 'query' ); $id = 'get-shortlink'; if ( empty( $short ) ) { return; } $html = '<input class="shortlink-input" type="text" readonly="readonly" value="' . esc_attr( $short ) . '" aria-label="' . __( 'Shortlink' ) . '" />'; $wp_admin_bar->add_node( array( 'id' => $id, 'title' => __( 'Shortlink' ), 'href' => $short, 'meta' => array( 'html' => $html ), ) );}Introduced in 3.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/admin-bar.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.