Skip to:
Content

bbPress.org

Changeset 5866


Ignore:
Timestamp:
07/17/2015 10:25:41 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Prefer current_filter() over current_action() to maintain compatibility with WordPress versions older than 3.9. Fixes #2529.

Location:
trunk/src/includes
Files:
2 edited

Legend:

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

    r5859 r5866  
    930930            // Make every effort to get topic id
    931931            // https://bbpress.trac.wordpress.org/ticket/2529
    932             if ( empty( $topic_id ) && ( current_action() === 'bbp_deleted_reply' ) ) {
     932            if ( empty( $topic_id ) && ( current_filter() === 'bbp_deleted_reply' ) ) {
    933933                $topic_id = get_post_field( 'post_parent', $reply_id );
    934934            }
  • trunk/src/includes/topics/functions.php

    r5860 r5866  
    965965            // Make every effort to get forum id
    966966            // https://bbpress.trac.wordpress.org/ticket/2529
    967             if ( empty( $forum_id ) && ( current_action() === 'bbp_deleted_topic' ) ) {
     967            if ( empty( $forum_id ) && ( current_filter() === 'bbp_deleted_topic' ) ) {
    968968                $forum_id = get_post_field( 'post_parent', $topic_id );
    969969            }
Note: See TracChangeset for help on using the changeset viewer.