[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 2063 lines (77 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
Akismet:: (65 methods):
init()
init_hooks()
get_api_key()
get_access_token()
check_key_status()
verify_key()
deactivate_key()
add_to_jetpack_options_whitelist()
updated_option()
added_option()
rest_auto_check_comment()
auto_check_comment()
get_last_comment()
set_last_comment()
auto_check_update_meta()
delete_old_comments()
delete_old_comments_meta()
delete_orphaned_commentmeta()
get_user_comments_approved()
get_comment_history()
update_comment_history()
check_db_comment()
recheck_comment()
transition_comment_status()
submit_spam_comment()
submit_nonspam_comment()
cron_recheck()
fix_scheduled_recheck()
add_comment_nonce()
is_test_mode()
allow_discard()
get_ip_address()
comments_match()
matches_last_comment()
matches_last_comment_by_id()
get_fields_for_comment_matching()
get_user_agent()
get_referer()
get_user_roles()
last_comment_status()
disable_moderation_emails_if_unreachable()
_cmp_time()
_get_microtime()
http_post()
update_alert()
set_form_js_async()
get_akismet_form_fields()
output_custom_form_fields()
inject_custom_form_fields()
append_custom_form_fields()
prepare_custom_form_values()
bail_on_activation()
view()
plugin_activation()
plugin_deactivation()
build_query()
log()
pre_check_pingback()
sanitize_comment_as_submitted()
predefined_api_key()
display_comment_form_privacy_notice()
load_form_js()
load_form_js_via_filter()
last_comment_status_change_came_from_akismet()
last_comment_check_response()
init() X-Ref |
No description |
init_hooks() X-Ref |
Initializes WordPress hooks |
get_api_key() X-Ref |
No description |
get_access_token() X-Ref |
Exchange the API key for a token that can only be used to access stats pages. return: string |
check_key_status( $key, $ip = null ) X-Ref |
No description |
verify_key( $key, $ip = null ) X-Ref |
No description |
deactivate_key( $key ) X-Ref |
No description |
add_to_jetpack_options_whitelist( $options ) X-Ref |
Add the akismet option to the Jetpack options management whitelist. return: array The updated whitelist param: array $options The list of whitelisted option names. |
updated_option( $old_value, $value ) X-Ref |
When the akismet option is updated, run the registration call. This should only be run when the option is updated from the Jetpack/WP.com API call, and only if the new key is different than the old key. param: mixed $old_value The old option value. param: mixed $value The new option value. |
added_option( $option_name, $value ) X-Ref |
Treat the creation of an API key the same as updating the API key to a new value. param: mixed $option_name Will always be "wordpress_api_key", until something else hooks in here. param: mixed $value The option value. |
rest_auto_check_comment( $commentdata ) X-Ref |
No description |
auto_check_comment( $commentdata, $context = 'default' ) X-Ref |
Check a comment for spam. return: array|WP_Error Either the $commentdata array with additional entries related to its spam status param: array $commentdata param: string $context What kind of request triggered this comment check? Possible values are 'default', 'rest_api', and 'xml-rpc'. |
get_last_comment() X-Ref |
No description |
set_last_comment( $comment ) X-Ref |
No description |
auto_check_update_meta( $id, $comment ) X-Ref |
No description |
delete_old_comments() X-Ref |
No description |
delete_old_comments_meta() X-Ref |
No description |
delete_orphaned_commentmeta() X-Ref |
No description |
get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) X-Ref |
No description |
get_comment_history( $comment_id ) X-Ref |
Get the full comment history for a given comment, as an array in reverse chronological order. Each entry will have an 'event', a 'time', and possible a 'message' member (if the entry is old enough). Some entries will also have a 'user' or 'meta' member. return: array|bool An array of history events, or false if there is no history. param: int $comment_id The relevant comment ID. |
update_comment_history( $comment_id, $message, $event = null, $meta = null ) X-Ref |
Log an event for a given comment, storing it in comment_meta. param: int $comment_id The ID of the relevant comment. param: string $message The string description of the event. No longer used. param: string $event The event code. param: array $meta Metadata about the history entry. e.g., the user that reported or changed the status of a given comment. |
check_db_comment( $id, $recheck_reason = 'recheck_queue' ) X-Ref |
No description |
recheck_comment( $id, $recheck_reason = 'recheck_queue' ) X-Ref |
No description |
transition_comment_status( $new_status, $old_status, $comment ) X-Ref |
No description |
submit_spam_comment( $comment_id ) X-Ref |
No description |
submit_nonspam_comment( $comment_id ) X-Ref |
No description |
cron_recheck() X-Ref |
No description |
fix_scheduled_recheck() X-Ref |
No description |
add_comment_nonce( $post_id ) X-Ref |
No description |
is_test_mode() X-Ref |
No description |
allow_discard() X-Ref |
No description |
get_ip_address() X-Ref |
No description |
comments_match( $comment1, $comment2 ) X-Ref |
Using the unique values that we assign, do we consider these two comments to be the same instance of a comment? The only fields that matter in $comment1 and $comment2 are akismet_guid and akismet_skipped_microtime. We set both of these during the comment-check call, and if the comment has been saved to the DB, we save them as comment meta and add them back into the comment array before comparing the comments. return: bool Whether the two comments should be treated as the same comment. param: mixed $comment1 A comment object or array. param: mixed $comment2 A comment object or array. |
matches_last_comment( $comment ) X-Ref |
Does the supplied comment match the details of the one most recently stored in self::$last_comment? return: bool Whether the comment supplied as an argument is a match for the one we have stored in $last_comment. param: array $comment |
matches_last_comment_by_id( $comment_id ) X-Ref |
Because of the order of operations, we don't always know the comment ID of the comment that we're checking, so we have to be able to match the comment we cached locally with the comment from the DB. return: bool Whether the comment represented by $comment_id is a match for the one we have stored in $last_comment. param: int $comment_id |
get_fields_for_comment_matching( $comment_id ) X-Ref |
Given a comment ID, retrieve the values that we use for matching comments together. return: array An array containing akismet_guid and akismet_skipped_microtime. Either or both may be falsy, but we hope that at least one is a string. param: int $comment_id |
get_user_agent() X-Ref |
No description |
get_referer() X-Ref |
No description |
get_user_roles( $user_id ) X-Ref |
No description |
last_comment_status( $approved, $comment ) X-Ref |
No description |
disable_moderation_emails_if_unreachable( $emails, $comment_id ) X-Ref |
If Akismet is temporarily unreachable, we don't want to "spam" the blogger with moderation emails for comments that will be automatically cleared or spammed on the next retry. For comments that will be rechecked later, empty the list of email addresses that the moderation email would be sent to. return: array An array of email addresses that the moderation email will be sent to. param: array $emails An array of email addresses that the moderation email will be sent to. param: int $comment_id The ID of the relevant comment. |
_cmp_time( $a, $b ) X-Ref |
No description |
_get_microtime() X-Ref |
No description |
http_post( $request, $path, $ip = null ) X-Ref |
Make a POST request to the Akismet API. return: array A two-member array consisting of the headers and the response body, both empty in the case of a failure. param: string $request The body of the request. param: string $path The path for the request. param: string $ip The specific IP address to hit. |
update_alert( $response ) X-Ref |
No description |
set_form_js_async( $tag, $handle, $src ) X-Ref |
Mark akismet-frontend.js as deferred. Because nothing depends on it, it can run at any time after it's loaded, and the browser won't have to wait for it to load to continue parsing the rest of the page. |
get_akismet_form_fields() X-Ref |
No description |
output_custom_form_fields( $post_id ) X-Ref |
No description |
inject_custom_form_fields( $html ) X-Ref |
No description |
append_custom_form_fields( $html ) X-Ref |
No description |
prepare_custom_form_values( $form, $data = null ) X-Ref |
Ensure that any Akismet-added form fields are included in the comment-check call. return: array $form param: array $form param: array $data Some plugins will supply the POST data via the filter, since they don't |
bail_on_activation( $message, $deactivate = true ) X-Ref |
No description |
view( $name, array $args = array() X-Ref |
No description |
plugin_activation() X-Ref |
Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook() |
plugin_deactivation() X-Ref |
Removes all connection options |
build_query( $args ) X-Ref |
Essentially a copy of WP's build_query but one that doesn't expect pre-urlencoded values. return: string A string ready for use as a URL query string. param: array $args An array of key => value pairs |
log( $akismet_debug ) X-Ref |
Log debugging info to the error log. Enabled when WP_DEBUG_LOG is enabled (and WP_DEBUG, since according to core, "WP_DEBUG_DISPLAY and WP_DEBUG_LOG perform no function unless WP_DEBUG is true), but can be disabled via the akismet_debug_log filter. param: mixed $akismet_debug The data to log. |
pre_check_pingback( $method, $args = array() X-Ref |
Check pingbacks for spam before they're saved to the DB. param: string $method The XML-RPC method that was called. param: array $args This and the $server arg are marked as optional since plugins might still be param: wp_xmlrpc_server $server |
sanitize_comment_as_submitted( $meta_value ) X-Ref |
Ensure that we are loading expected scalar values from akismet_as_submitted commentmeta. return: mixed param: mixed $meta_value |
predefined_api_key() X-Ref |
No description |
display_comment_form_privacy_notice() X-Ref |
Controls the display of a privacy related notice underneath the comment form using the `akismet_comment_form_privacy_notice` option and filter respectively. Default is to not display the notice, leaving the choice to site admins, or integrators. |
load_form_js() X-Ref |
No description |
load_form_js_via_filter( $return_value, $tag, $attr, $m ) X-Ref |
Add the form JavaScript when we detect that a supported form shortcode is being parsed. |
last_comment_status_change_came_from_akismet( $comment_id ) X-Ref |
Was the last entry in the comment history created by Akismet? return: bool param: int $comment_id The ID of the comment. |
last_comment_check_response( $comment_id ) X-Ref |
Check the comment history to find out what the most recent comment-check response said about this comment. This value is then included in submit-ham and submit-spam requests to allow us to know whether the comment is actually a missed spam/ham or if it's just being reclassified after either never being checked or being mistakenly marked as ham/spam. return: string 'true', 'false', or an empty string if we don't have a record param: int $comment_id The comment ID. |
Generated : Fri Feb 21 08:20:01 2025 | Cross-referenced by PHPXref |