comment_cron

function comment_cron

comment_cron()

Implements hook_cron().

File

core/modules/comment/comment.module, line 476
Enables users to comment on published content.

Code

function comment_cron() {
  // Store the maximum possible comments per thread (used for node search
  // ranking by reply count).
  \Drupal::state()->set('comment.node_comment_statistics_scale', 1.0 / max(1, \Drupal::service('comment.statistics')->getMaximumCount('node')));
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!comment!comment.module/function/comment_cron/8.1.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部