Changeset 7380 for trunk/src/includes/extend/akismet.php
- Timestamp:
- 12/05/2025 02:27:53 AM (6 months ago)
- File:
-
- 1 edited
-
trunk/src/includes/extend/akismet.php (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/extend/akismet.php
r7379 r7380 2 2 3 3 /** 4 * Main bbPress Akismet Class 4 * Main bbPress Akismet Class. 5 5 * 6 6 * @package bbPress … … 13 13 if ( ! class_exists( 'BBP_Akismet' ) ) : 14 14 /** 15 * Loads Akismet extension 15 * Loads Akismet extension. 16 16 * 17 17 * @since 2.0.0 bbPress (r3277) … … 32 32 33 33 /** 34 * The main bbPress Akismet loader 34 * The main bbPress Akismet loader. 35 35 * 36 36 * @since 2.0.0 bbPress (r3277) … … 41 41 42 42 /** 43 * Setup the admin hooks 43 * Setup the admin hooks. 44 44 * 45 45 * @since 2.0.0 bbPress (r3277) … … 90 90 91 91 /** 92 * Converts topic/reply data into Akismet comment checking format 92 * Converts topic/reply data into Akismet comment checking format. 93 93 * 94 94 * @since 2.0.0 bbPress (r3277) … … 96 96 * @param array $post_data 97 97 * 98 * @return array Array of post data 98 * @return array Array of post data. 99 99 */ 100 100 public function check_post( $post_data = array() ) { … … 272 272 273 273 /** 274 * Submit a post for spamming or hamming 274 * Submit a post for spamming or hamming. 275 275 * 276 276 * @since 2.0.0 bbPress (r3277) 277 277 * 278 * @param int $post_id 278 * @param int $post_id Post id. 279 279 * 280 280 * @global string $akismet_api_host … … 283 283 * @global object $current_site 284 284 * 285 * @return array Array of existing topic terms 285 * @return array Array of existing topic terms. 286 286 */ 287 287 public function submit_post( $post_id = 0 ) { … … 438 438 439 439 /** 440 * Ping Akismet service and check for spam/ham response 440 * Ping Akismet service and check for spam/ham response. 441 441 * 442 442 * @since 2.0.0 bbPress (r3277) 443 443 * 444 444 * @param array $post_data 445 * @param string $check Accepts check|submit 446 * @param string $spam Accepts spam|ham 445 * @param string $check Accepts check|submit. 446 * @param string $spam Accepts spam|ham. 447 447 * 448 448 * @global string $akismet_api_host 449 449 * @global string $akismet_api_port 450 450 * 451 * @return array Array of post data 451 * @return array Array of post data. 452 452 */ 453 453 private function maybe_spam( $post_data = array(), $check = 'check', $spam = 'spam' ) { … … 537 537 538 538 /** 539 * Update post meta after a spam check 539 * Update post meta after a spam check. 540 540 * 541 541 * @since 2.0.0 bbPress (r3308) 542 542 * 543 * @param int $post_id 543 * @param int $post_id Post id. 544 544 * @param object $_post 545 545 * … … 702 702 703 703 /** 704 * Update Akismet history of a Post 704 * Update Akismet history of a Post. 705 705 * 706 706 * @since 2.0.0 bbPress (r3308) … … 741 741 742 742 /** 743 * Get the Akismet history of a Post 743 * Get the Akismet history of a Post. 744 744 * 745 745 * @since 2.0.0 bbPress (r3308) … … 747 747 * @param int $post_id 748 748 * 749 * @return array Array of Akismet history 749 * @return array Array of Akismet history. 750 750 */ 751 751 public function get_post_history( $post_id = 0 ) { … … 761 761 762 762 /** 763 * Handle any terms submitted with a post flagged as spam 763 * Handle any terms submitted with a post flagged as spam. 764 764 * 765 765 * @since 2.0.0 bbPress (r3308) 766 766 * 767 * @param string $terms Comma-separated list of terms 767 * @param string $terms Comma-separated list of terms. 768 768 * @param int $topic_id 769 769 * @param int $reply_id 770 770 * 771 * @return array Array of existing topic terms 771 * @return array Array of existing topic terms. 772 772 */ 773 773 public function filter_post_terms( $terms = '', $topic_id = 0, $reply_id = 0 ) { … … 790 790 791 791 /** 792 * Submit data to Akismet service with unique bbPress User Agent 792 * Submit data to Akismet service with unique bbPress User Agent. 793 793 * 794 794 * This code is directly taken from the akismet_http_post() function and … … 797 797 * @since 2.0.0 bbPress (r3466) 798 798 * 799 * @param string $request The request we are sending 800 * @param string $host The host to send our request to 801 * @param string $path The path from the host 802 * @param string $port The port to use 803 * @param string $ip Optional Override $host with an IP address 804 * @return mixed WP_Error on error, array on success, empty on failure 799 * @param string $request The request we are sending. 800 * @param string $host The host to send our request to. 801 * @param string $path The path from the host. 802 * @param string $port The port to use. 803 * @param string $ip Optional Override $host with an IP address. 804 * @return mixed WP_Error on error, array on success, empty on failure. 805 805 */ 806 806 private function http_post( $request, $host, $path, $port = 80, $ip = '' ) { … … 842 842 * @since 2.6.7 (bbPress r7194) 843 843 * 844 * @param string $host_and_path Scheme-less URL 845 * @param array $http_args Array of arguments for wp_remote_post() 844 * @param string $host_and_path Scheme-less URL. 845 * @param array $http_args Array of arguments for wp_remote_post(). 846 846 * @return array 847 847 */ … … 908 908 909 909 /** 910 * Return a user's roles on this site (including super_admin) 910 * Return a user's roles on this site (including super_admin). 911 911 * 912 912 * @since 2.3.0 bbPress (r4812) 913 913 * 914 * @param int $user_id 914 * @param int $user_id User id. 915 915 * 916 916 * @return boolean … … 943 943 944 944 /** 945 * Add Aksimet History meta-boxes to topics and replies 945 * Add Aksimet History meta-boxes to topics and replies. 946 946 * 947 947 * @since 2.4.0 bbPress (r5049) … … 971 971 972 972 /** 973 * Output for Akismet History meta-box 973 * Output for Akismet History meta-box. 974 974 * 975 975 * @since 2.4.0 bbPress (r5049)
Note: See TracChangeset
for help on using the changeset viewer.