当前位置: 首页>>代码示例>>PHP>>正文


PHP Akismet::initiated方法代码示例

本文整理汇总了PHP中Akismet::initiated方法的典型用法代码示例。如果您正苦于以下问题:PHP Akismet::initiated方法的具体用法?PHP Akismet::initiated怎么用?PHP Akismet::initiated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Akismet的用法示例。


在下文中一共展示了Akismet::initiated方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init_hooks

 /**
  * Initializes WordPress hooks
  */
 private static function init_hooks()
 {
     self::$initiated = true;
     add_action('wp_insert_comment', array('Akismet', 'auto_check_update_meta'), 10, 2);
     add_action('preprocess_comment', array('Akismet', 'auto_check_comment'), 1);
     add_action('akismet_scheduled_delete', array('Akismet', 'delete_old_comments'));
     add_action('akismet_scheduled_delete', array('Akismet', 'delete_old_comments_meta'));
     add_action('akismet_schedule_cron_recheck', array('Akismet', 'cron_recheck'));
     $akismet_comment_nonce_option = apply_filters('akismet_comment_nonce', get_option('akismet_comment_nonce'));
     if ($akismet_comment_nonce_option == 'true' || $akismet_comment_nonce_option == '') {
         add_action('comment_form', array('Akismet', 'add_comment_nonce'), 1);
     }
     add_action('admin_head-edit-comments.php', array('Akismet', 'load_form_js'));
     add_action('comment_form', array('Akismet', 'load_form_js'));
     add_action('comment_form', array('Akismet', 'inject_ak_js'));
     add_filter('comment_moderation_recipients', array('Akismet', 'disable_moderation_emails_if_unreachable'), 1000, 2);
     add_filter('pre_comment_approved', array('Akismet', 'last_comment_status'), 10, 2);
     add_action('transition_comment_status', array('Akismet', 'transition_comment_status'), 10, 3);
     if ('3.0.5' == $GLOBALS['wp_version']) {
         remove_filter('comment_text', 'wp_kses_data');
         if (is_admin()) {
             add_filter('comment_text', 'wp_kses_post');
         }
     }
 }
开发者ID:uwitec,项目名称:findgreatmaster,代码行数:28,代码来源:class.akismet.php

示例2: init_hooks

 /**
  * Initializes WordPress hooks
  */
 private static function init_hooks()
 {
     self::$initiated = true;
     add_action('wp_insert_comment', array('Akismet', 'auto_check_update_meta'), 10, 2);
     add_filter('preprocess_comment', array('Akismet', 'auto_check_comment'), 1);
     add_action('akismet_scheduled_delete', array('Akismet', 'delete_old_comments'));
     add_action('akismet_scheduled_delete', array('Akismet', 'delete_old_comments_meta'));
     add_action('akismet_schedule_cron_recheck', array('Akismet', 'cron_recheck'));
     /**
      * To disable the Akismet comment nonce, add a filter for the 'akismet_comment_nonce' tag
      * and return any string value that is not 'true' or '' (empty string).
      *
      * Don't return boolean false, because that implies that the 'akismet_comment_nonce' option
      * has not been set and that Akismet should just choose the default behavior for that
      * situation.
      */
     $akismet_comment_nonce_option = apply_filters('akismet_comment_nonce', get_option('akismet_comment_nonce'));
     if ($akismet_comment_nonce_option == 'true' || $akismet_comment_nonce_option == '') {
         add_action('comment_form', array('Akismet', 'add_comment_nonce'), 1);
     }
     add_action('admin_head-edit-comments.php', array('Akismet', 'load_form_js'));
     add_action('comment_form', array('Akismet', 'load_form_js'));
     add_action('comment_form', array('Akismet', 'inject_ak_js'));
     add_filter('comment_moderation_recipients', array('Akismet', 'disable_moderation_emails_if_unreachable'), 1000, 2);
     add_filter('pre_comment_approved', array('Akismet', 'last_comment_status'), 10, 2);
     add_action('transition_comment_status', array('Akismet', 'transition_comment_status'), 10, 3);
     // Run this early in the pingback call, before doing a remote fetch of the source uri
     add_action('xmlrpc_call', array('Akismet', 'pre_check_pingback'));
 }
开发者ID:onedaylabs,项目名称:onedaylabs.com,代码行数:32,代码来源:class.akismet.php

示例3: init_hooks

 /**
  * Initializes WordPress hooks
  */
 private static function init_hooks()
 {
     self::$initiated = true;
     add_action('wp_insert_comment', array('Akismet', 'auto_check_update_meta'), 10, 2);
     add_filter('preprocess_comment', array('Akismet', 'auto_check_comment'), 1);
     add_action('akismet_scheduled_delete', array('Akismet', 'delete_old_comments'));
     add_action('akismet_scheduled_delete', array('Akismet', 'delete_old_comments_meta'));
     add_action('akismet_schedule_cron_recheck', array('Akismet', 'cron_recheck'));
     $akismet_comment_nonce_option = apply_filters('akismet_comment_nonce', get_option('akismet_comment_nonce'));
     if ($akismet_comment_nonce_option == 'true' || $akismet_comment_nonce_option == '') {
         add_action('comment_form', array('Akismet', 'add_comment_nonce'), 1);
     }
     add_action('admin_head-edit-comments.php', array('Akismet', 'load_form_js'));
     add_action('comment_form', array('Akismet', 'load_form_js'));
     add_action('comment_form', array('Akismet', 'inject_ak_js'));
     add_filter('comment_moderation_recipients', array('Akismet', 'disable_moderation_emails_if_unreachable'), 1000, 2);
     add_filter('pre_comment_approved', array('Akismet', 'last_comment_status'), 10, 2);
     add_action('transition_comment_status', array('Akismet', 'transition_comment_status'), 10, 3);
     // Run this early in the pingback call, before doing a remote fetch of the source uri
     add_action('xmlrpc_call', array('Akismet', 'pre_check_pingback'));
 }
开发者ID:natalieryder,项目名称:snaptactix,代码行数:24,代码来源:class.akismet.php


注:本文中的Akismet::initiated方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。