Enables users to comment on published content.

When enabled, the Comment module creates a discussion board for each Backdrop node. Users can post comments to discuss a blog post, article, etc.

File

core/modules/comment/comment.module

Functions

Namesort descending Description
comment_access Determines whether the current user has access to a particular comment.
comment_action_info Implements hook_action_info().
comment_alphadecimal_to_int Decodes a sorting code back to an integer.
comment_autoload_info Implements hook_autoload_info().
comment_block_configure Implements hook_block_configure().
comment_block_info Implements hook_block_info().
comment_block_view Implements hook_block_view().
comment_build_content Builds a structured array representing the comment's content.
comment_config_create_validate Implements hook_config_create_validate()
comment_count_unpublished Returns a menu title which includes the number of unapproved comments.
comment_cron Implements hook_cron().
comment_delete Deletes a comment and all its replies.
comment_delete_multiple Deletes comments and all their replies.
comment_edit_page Page callback: Displays the comment editing form.
comment_entity_info Implements hook_entity_info().
comment_field_extra_fields Implements hook_field_extra_fields().
comment_file_download_access Implements hook_file_download_access().
comment_form Form constructor for the basic commenting form.
comment_forms Implements hook_forms().
comment_form_build_preview Form submission handler for the 'preview' button in comment_form().
comment_form_node_form_alter Implements hook_form_BASE_FORM_ID_alter().
comment_form_node_type_form_alter Implements hook_form_FORM_ID_alter().
comment_form_submit Form submission handler for comment_form().
comment_form_submit_build_comment Updates the comment entity by processing the submission's values.
comment_form_validate Form validation handler for comment_form().
comment_get_display_ordinal Gets the display ordinal for a comment, starting from 0.
comment_get_display_page Returns the page number for a comment.
comment_get_recent Finds the most recent comments that are available to the current user.
comment_get_thread Retrieves comments for a thread.
comment_increment_alphadecimal Increments a sorting code to the next value.
comment_int_to_alphadecimal Generates a sorting code.
comment_links Adds reply, edit, delete, etc. links, depending on user permissions.
comment_load Loads the entire comment by comment ID.
comment_load_multiple Loads comments from the database.
comment_menu Implements hook_menu().
comment_menu_alter Implements hook_menu_alter().
comment_menu_node_type_load Loads the comment bundle name corresponding a given content type.
comment_new_page_count Calculates the page number for the first new comment.
comment_node_insert Implements hook_node_insert().
comment_node_load Implements hook_node_load().
comment_node_page_additions Builds the comment-related elements for node detail pages.
comment_node_predelete Implements hook_node_predelete().
comment_node_prepare Implements hook_node_prepare().
comment_node_presave Implements hook_node_presave().
comment_node_search_result Implements hook_node_search_result().
comment_node_type_delete Implements hook_node_type_delete().
comment_node_type_insert Implements hook_node_type_insert().
comment_node_type_load Implements hook_node_type_load().
comment_node_type_update Implements hook_node_type_update().
comment_node_update_index Implements hook_node_update_index().
comment_node_view Implements hook_node_view().
comment_num_new Gets the number of new comments for the current user and the specified node.
comment_permalink Redirects comment links to the correct page depending on comment settings.
comment_permission Implements hook_permission().
comment_prepare_thread Calculates the indentation level of each comment in a comment thread.
comment_preprocess_block Implements hook_preprocess_block().
comment_preprocess_node Prepares variables for comment.tpl.php
comment_preview Generates a comment preview.
comment_publish_action Publishes a comment.
comment_ranking Implements hook_ranking().
comment_save Saves a new or updated comment.
comment_submit Prepare a comment for submission.
comment_theme Implements hook_theme().
comment_unpublish_action Unpublishes a comment.
comment_update_index Implements hook_update_index().
comment_user_cancel Implements hook_user_cancel().
comment_user_predelete Implements hook_user_predelete().
comment_view Generates an array for rendering a comment.
comment_views_api Implements hook_views_api().
comment_view_multiple Constructs render array from an array of loaded comments.
_comment_body_field_create Creates a comment_body field instance for a given node type.
_comment_close_all Close all comments that meet the current threshold.
_comment_get_modes Returns an array of viewing modes for comment listings.
_comment_per_page Returns an array of "comments per page" values that users can select from.

Constants

Namesort descending Description
COMMENT_ANONYMOUS_MAYNOT_CONTACT Anonymous posters cannot enter their contact information.
COMMENT_ANONYMOUS_MAY_CONTACT Anonymous posters may leave their contact information.
COMMENT_ANONYMOUS_MUST_CONTACT Anonymous posters are required to leave their contact information.
COMMENT_FORM_BELOW Comment form should be shown below post or list of comments.
COMMENT_FORM_SEPARATE_PAGE Comment form should be displayed on a separate page.
COMMENT_MODE_FLAT Comments are displayed in a flat list - expanded.
COMMENT_MODE_THREADED Comments are displayed as a threaded list - expanded.
COMMENT_NODE_CLOSED Comments for this node are closed.
COMMENT_NODE_HIDDEN Comments for this node are hidden.
COMMENT_NODE_OPEN Comments for this node are open.
COMMENT_NOT_PUBLISHED Comment is awaiting approval.
COMMENT_PUBLISHED Comment is published.