enqueue_comment_hotkeys_js() WordPress Function

This function enqueues the comment hotkeys JavaScript file. This is only done if the user is logged in and if the comment_form() function has been called. This function allows for easier commenting on Wordpress websites. It adds hotkeys so that the user can submit a comment without having to use the mouse. This can be useful for users who prefer to use the keyboard or who have mobility impairments.

enqueue_comment_hotkeys_js() #


Source

File: wp-admin/includes/comment.php

function enqueue_comment_hotkeys_js() {
	if ( 'true' === get_user_option( 'comment_shortcuts' ) ) {
		wp_enqueue_script( 'jquery-table-hotkeys' );
	}
}


Top ↑

Changelog

Changelog
VersionDescription
2.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.