Changeset 7356
- Timestamp:
- 11/14/2025 11:30:00 PM (4 weeks ago)
- File:
-
- 1 edited
-
trunk/src/includes/extend/akismet.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/extend/akismet.php
r7352 r7356 248 248 if ( 'true' === $post_data['bbp_akismet_result'] ) { 249 249 250 // Let plugins do their thing 251 do_action( 'bbp_akismet_spam_caught' ); 250 /** 251 * Hook that fires after Akismet has caught a post as spammy and 252 * immediately before its status is set to spam. 253 * 254 * @since 2.0.0 bbPress (r3308) 255 * 256 * @param array $post_data Post data. 257 */ 258 do_action( 'bbp_akismet_spam_caught', $post_data ); 252 259 253 260 // Set post_status to spam … … 559 566 if ( is_object( $_post ) && ! empty( $this->last_post ) && is_array( $as_submitted ) ) { 560 567 568 /** 569 * Fires immediately before post meta is updated on a bbPress post 570 * that Akismet has checked. 571 * 572 * @since 2.7.0 bbPress (r7355) 573 * 574 * @param int $post_id 575 * @param object $_post 576 */ 577 do_action( 'bbp_akismet_before_update_post_meta', $post_id, $_post ); 578 561 579 // Get user data 562 580 $userdata = get_userdata( $_post->post_author ); … … 602 620 $this->update_post_history( 603 621 $post_id, 604 esc_html__( 'Akismet caught this post as spam ', 'bbpress' ),622 esc_html__( 'Akismet caught this post as spam.', 'bbpress' ), 605 623 'check-spam' 606 624 ); … … 611 629 $post_id, 612 630 sprintf( 613 esc_html__( ' Post status was changed to %s', 'bbpress' ),631 esc_html__( 'Akismet overruled. Post status overridden to %s.', 'bbpress' ), 614 632 $_post->post_status 615 633 ), … … 625 643 $this->update_post_history( 626 644 $post_id, 627 esc_html__( 'Akismet cleared this post as not spam ', 'bbpress' ),645 esc_html__( 'Akismet cleared this post as not spam.', 'bbpress' ), 628 646 'check-ham' 629 647 ); … … 634 652 $post_id, 635 653 sprintf( 636 esc_html__( ' Post status was changed to %s', 'bbpress' ),654 esc_html__( 'Akismet overruled. Post status overridden to %s.', 'bbpress' ), 637 655 $_post->post_status 638 656 ), … … 664 682 } 665 683 } 684 685 /** 686 * Fires immediately after post meta is updated on a bbPress post 687 * that Akismet has checked. 688 * 689 * @since 2.7.0 bbPress (r7355) 690 * 691 * @param int $post_id 692 * @param object $_post 693 */ 694 do_action( 'bbp_akismet_after_update_post_meta', $post_id, $_post ); 666 695 } 667 696 } … … 671 700 * 672 701 * @since 2.0.0 bbPress (r3308) 702 * @since 2.7.0 bbPress (r7355) Changed from private to public. 673 703 * 674 704 * @param int $post_id … … 676 706 * @param string $event 677 707 */ 678 p rivatefunction update_post_history( $post_id = 0, $message = null, $event = null ) {708 public function update_post_history( $post_id = 0, $message = null, $event = null ) { 679 709 680 710 // Define local variable(s)
Note: See TracChangeset
for help on using the changeset viewer.