Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/27/2025 09:54:08 PM (5 months ago)
Author:
johnjamesjacoby
Message:

API - Actions/Filters: pass filtered author values into actions when adding/editing forums/topics/replies.

This change uses the pre-filtered _data versions of author IDs rather than the original/unfiltered ones, fixing an unintended behavior where the newly filtered author ID was not being used by the subsequent hooked-in functions.

See: https://meta.trac.wordpress.org/ticket/6839

Props dd32.

In trunk, for 2.7.

Fixes #3578.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/topics/functions.php

    r7268 r7318  
    374374        /** Update counts, etc... *********************************************/
    375375
    376         do_action( 'bbp_new_topic', $topic_id, $forum_id, $anonymous_data, $topic_author );
     376        do_action( 'bbp_new_topic', $topic_id, $forum_id, $anonymous_data, $topic_data['post_author'] );
    377377
    378378        /** Additional Actions (After Save) ***********************************/
     
    665665
    666666        // Update counts, etc...
    667         do_action( 'bbp_edit_topic', $topic_id, $forum_id, $anonymous_data, $topic_author, true /* Is edit */ );
     667        do_action( 'bbp_edit_topic', $topic_id, $forum_id, $anonymous_data, $topic_data['post_author'], true /* Is edit */ );
    668668
    669669        /** Revisions *********************************************************/
Note: See TracChangeset for help on using the changeset viewer.