Making WordPress.org

Changeset 10663


Ignore:
Timestamp:
02/12/2021 12:16:38 AM (3 years ago)
Author:
dd32
Message:

Support: Don't include moderator query vars in the permalink sent to the Profiles feed.

Fixes #5607.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-profiles-wp-activity-notifier/wporg-profiles-wp-activity-notifier.php

    r9824 r10663  
    256256        }
    257257
     258        $url = bbp_get_topic_permalink( $topic_id );
     259        // Remove moderator flags
     260        $url = remove_query_arg( [ 'view' ], $url );
     261
    258262        $args = array(
    259263            'body' => array(
     
    266270                'forum_id'  => bbp_get_topic_forum_id( $topic_id ),
    267271                'title'     => strip_tags( bbp_get_topic_title( $topic_id ) ),
    268                 'url'       => bbp_get_topic_permalink( $topic_id ),
     272                'url'       => $url,
    269273                'message'   => bbp_get_topic_excerpt( $topic_id, 55 ),
    270274                'site'      => get_bloginfo( 'name' ),
     
    273277        );
    274278
    275         $x = wp_remote_post( $this->activity_handler_url, $args );
     279        wp_remote_post( $this->activity_handler_url, $args );
    276280    }
    277281
     
    323327            return;
    324328        }
     329
     330        $url = bbp_get_reply_url( $reply_id );
     331        // Remove moderator flags
     332        $url = remove_query_arg( [ 'view' ], $url );
    325333
    326334        $args = array(
     
    334342                'forum_id'  => bbp_get_reply_forum_id( $reply_id ),
    335343                'title'     => strip_tags( bbp_get_reply_topic_title( $reply_id ) ),
    336                 'url'       => bbp_get_reply_url( $reply_id ),
     344                'url'       => $url,
    337345                'message'   => $this->get_reply_excerpt( $reply_id, 15 ),
    338346                'site'      => get_bloginfo( 'name' ),
Note: See TracChangeset for help on using the changeset viewer.