[ Index ]

PHP Cross Reference of BBPress

title

Body

[close]

/src/includes/extend/ -> akismet.php (summary)

Main bbPress Akismet Class

File Size: 1271 lines (37 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BBP_Akismet:: (21 methods):
  __construct()
  setup_actions()
  check_post()
  parse_response()
  submit_post()
  maybe_spam()
  update_post_meta()
  update_post_history()
  get_post_history()
  filter_post_terms()
  http_post()
  get_response()
  get_user_roles()
  add_metaboxes()
  history_metabox()
  get_delete_limit()
  get_delete_interval()
  delete_old_spam()
  delete_old_spam_meta()
  delete_orphaned_spam_meta()
  maybe_optimize_postmeta()


Class: BBP_Akismet  - X-Ref

Loads Akismet extension

__construct()   X-Ref
The main bbPress Akismet loader

since: 2.0.0 bbPress (r3277)

setup_actions()   X-Ref
Setup the admin hooks

since: 2.0.0 bbPress (r3277)

check_post( $post_data = array()   X-Ref
Converts topic/reply data into Akismet comment checking format

return: array Array of post data
param: array $post_data
since: 2.0.0 bbPress (r3277)

parse_response( $post_data = array()   X-Ref
Parse the response from the Akismet service, and alter the post data as
necessary. For example, switch the status to `spam` if spammy.

Note: this method also is responsible for allowing users who can moderate to
never have their posts marked as spam. This is because they are "trusted"
users. However, their posts are still sent to Akismet to be checked.

return: array
param: array $post_data
since: 2.6.0 bbPress (r6873)

submit_post( $post_id = 0 )   X-Ref
Submit a post for spamming or hamming

return: array Array of existing topic terms
param: int $post_id
since: 2.0.0 bbPress (r3277)

maybe_spam( $post_data = array()   X-Ref
Ping Akismet service and check for spam/ham response

return: array Array of post data
param: array $post_data
param: string $check Accepts check|submit
param: string $spam Accepts spam|ham
since: 2.0.0 bbPress (r3277)

update_post_meta( $post_id = 0, $_post = false )   X-Ref
Update post meta after a spam check

param: int $post_id
param: object $_post
since: 2.0.0 bbPress (r3308)

update_post_history( $post_id = 0, $message = null, $event = null )   X-Ref
Update Akismet history of a Post

param: int $post_id
param: string $message
param: string $event
since: 2.0.0 bbPress (r3308)

get_post_history( $post_id = 0 )   X-Ref
Get the Akismet history of a Post

return: array Array of Akismet history
param: int $post_id
since: 2.0.0 bbPress (r3308)

filter_post_terms( $terms = '', $topic_id = 0, $reply_id = 0 )   X-Ref
Handle any terms submitted with a post flagged as spam

return: array Array of existing topic terms
param: string $terms Comma-separated list of terms
param: int $topic_id
param: int $reply_id
since: 2.0.0 bbPress (r3308)

http_post( $request, $host, $path, $port = 80, $ip = '' )   X-Ref
Submit data to Akismet service with unique bbPress User Agent

This code is directly taken from the akismet_http_post() function and
documented to bbPress 2.0 standard.

return: mixed WP_Error on error, array on success, empty on failure
param: string $request The request we are sending
param: string $host The host to send our request to
param: string $path The path from the host
param: string $port The port to use
param: string $ip Optional Override $host with an IP address
since: 2.0.0 bbPress (r3466)

get_response( $host_and_path = '', $http_args = array()   X-Ref
Handles the repeated calls to wp_remote_post(), including SSL support.

return: array
param: string $host_and_path Scheme-less URL
param: array  $http_args     Array of arguments for wp_remote_post()
since: 2.6.7 (bbPress r7194)

get_user_roles( $user_id = 0 )   X-Ref
Return a user's roles on this site (including super_admin)

return: boolean
param: int $user_id
since: 2.3.0 bbPress (r4812)

add_metaboxes()   X-Ref
Add Aksimet History meta-boxes to topics and replies

since: 2.4.0 bbPress (r5049)

history_metabox()   X-Ref
Output for Akismet History meta-box

since: 2.4.0 bbPress (r5049)

get_delete_limit( $filter = '' )   X-Ref
Get the number of rows to delete in a single clean-up query.

return: int
param: string $filter The name of the filter to run.
since: 2.6.9 bbPress (r7225)

get_delete_interval( $filter = '' )   X-Ref
Get the interval (in days) for spam to remain in the queue.

return: int
param: string $filter The name of the filter to run.
since: 2.6.9 bbPress (r7225)

delete_old_spam()   X-Ref
Deletes old spam topics & replies from the queue after 15 days
(determined by `_bbp_akismet_delete_spam_interval` filter)
since they are not useful in the long term.

since: 2.6.7 bbPress (r7203)

delete_old_spam_meta()   X-Ref
Deletes `_bbp_akismet_as_submitted` meta keys after 15 days
(determined by `_bbp_akismet_delete_spam_meta_interval` filter)
since they are large and not useful in the long term.

since: 2.6.7 bbPress (r7203)

delete_orphaned_spam_meta()   X-Ref
Clears post meta that no longer has corresponding posts in the database
(determined by `_bbp_akismet_delete_spam_orphaned_limit` filter)
since it is not useful in the long term.

since: 2.6.7 bbPress (r7203)

maybe_optimize_postmeta()   X-Ref
Maybe OPTIMIZE the _postmeta database table.

since: 2.7.0 bbPress (r7203)



Generated: Fri Jul 26 01:00:49 2024 Cross-referenced by PHPXref 0.7.1