Making WordPress.org

Changeset 5730


Ignore:
Timestamp:
08/02/2017 03:30:46 AM (8 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Unstick compat stickies on archiving.

See #2795.

File:
1 edited

Legend:

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

    r5729 r5730  
    507507                } else {
    508508                    bbp_unstick_topic( $post->ID );
     509
     510                    if ( Support_Compat::is_compat_forum( $post->post_parent ) ) {
     511                        $term            = null;
     512                        $plugin_instance = Plugin::get_instance();
     513
     514                        if ( ! empty( $plugin_instance->plugins->term ) ) {
     515                            $term = $plugin_instance->plugins->term;
     516                        } elseif ( ! empty( $plugin_instance->themes->term ) ) {
     517                            $term = $plugin_instance->themes->term;
    509518                        }
     519
     520                        Stickies_Compat::remove_sticky( $term->term_id, $post->ID );
     521                    }
     522                }
    510523
    511524                return true;
Note: See TracChangeset for help on using the changeset viewer.