Skip to:
Content

bbPress.org

Changeset 7136


Ignore:
Timestamp:
08/14/2020 05:53:33 PM (6 days ago)
Author:
johnjamesjacoby
Message:

Topics: Use global update functions for Forum & Topic IDs.

This commit cleans up an oversight where update_post_meta() was being called directly rather than their abstractions.

In branches/2.6, for 2.6.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/includes/topics/functions.php

    r7123 r7136  
    25022502    }
    25032503
    2504     $forum_id = (int) $forum_id;
    2505 
    2506     update_post_meta( $topic_id, '_bbp_forum_id', $forum_id );
     2504    // Update the forum ID
     2505    $forum_id = bbp_update_forum_id( $topic_id, $forum_id );
    25072506
    25082507    // Filter & return
     
    25202519function bbp_update_topic_topic_id( $topic_id = 0 ) {
    25212520    $topic_id = bbp_get_topic_id( $topic_id );
    2522 
    2523     update_post_meta( $topic_id, '_bbp_topic_id', $topic_id );
     2521    $topic_id = bbp_update_topic_id( $topic_id, $topic_id );
    25242522
    25252523    // Filter & return
    2526     return apply_filters( 'bbp_update_topic_topic_id', $topic_id );
     2524    return (int) apply_filters( 'bbp_update_topic_topic_id', $topic_id );
    25272525}
    25282526
Note: See TracChangeset for help on using the changeset viewer.