Making WordPress.org


Ignore:
Timestamp:
02/21/2023 05:48:06 AM (22 months ago)
Author:
dd32
Message:

Support Forums: Setup the Directory_Compat classes in the context of the topic when processing email subscriptions for pending/delayed topics.

See #6786.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-emails.php

    r12273 r12410  
    169169        $topic_author = bbp_get_topic_author_id( $topic_id );
    170170
     171        // Setup the forum compat classes, as used by email filters for subject changes.
     172        $forums = Plugin::get_instance();
     173        if ( $forums->plugins ) {
     174            $forums->plugins->init_for_topic( $topic_id );
     175            $forums->themes->init_for_topic( $topic_id );
     176        }
     177
    171178        // For performance reasons, we've removed the bbPress bbp_update_topic() method, and replaced it with our slightly altered variant.
    172179        $bbp_update_topic = [ Plugin::get_instance()->dropin, 'bbp_update_topic' ];
     
    203210        }
    204211
     212        // Setup the forum compat classes, as used by email filters for subject changes.
     213        $forums = Plugin::get_instance();
     214        if ( $forums->plugins ) {
     215            $forums->plugins->init_for_topic( $topic_id );
     216            $forums->themes->init_for_topic( $topic_id );
     217        }
     218
    205219        // For performance reasons, we've removed the bbPress bbp_update_reply() method, and replaced it with our slightly altered variant.
    206220        $bbp_update_reply = [ Plugin::get_instance()->dropin, 'bbp_update_reply' ];
Note: See TracChangeset for help on using the changeset viewer.