本文整理汇总了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');
}
}
}
示例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'));
}
示例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'));
}