當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。