Skip to:
Content

bbPress.org

Changeset 7248


Ignore:
Timestamp:
03/08/2022 08:30:31 PM (2 years ago)
Author:
johnjamesjacoby
Message:

URLs: fix incorrect links for certain topic statuses.

This change prefers bbp_is_topic_public() over ! bbp_is_topic_pending() to determine whether or not certain reply & topic URLs should be "pretty".

Props dd32.

In trunk, for 2.7.0.

Fixes #3424.

Location:
trunk/src/includes
Files:
2 edited

Legend:

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

    r7240 r7248  
    466466        $has_slug   = ! empty( $topic ) ? $topic->post_name : '';
    467467        $pretty     = bbp_use_pretty_urls();
    468         $published  = ! bbp_is_topic_pending( $topic_id );
     468        $published  = bbp_is_topic_public( $topic_id );
    469469
    470470        // Don't include pagination if on first page
  • trunk/src/includes/topics/template.php

    r7175 r7248  
    809809
    810810        // If pretty permalinks are enabled, make our pagination pretty
    811         $base = ! empty( $has_slug ) && bbp_use_pretty_urls() && ! bbp_is_topic_pending( $r['topic_id'] )
     811        $base = ! empty( $has_slug ) && bbp_use_pretty_urls() && bbp_is_topic_public( $r['topic_id'] )
    812812            ? trailingslashit( get_permalink( $r['topic_id'] ) ) . user_trailingslashit( bbp_get_paged_slug() . '/%#%/' )
    813813            : add_query_arg( 'paged', '%#%', get_permalink( $r['topic_id'] ) );
Note: See TracChangeset for help on using the changeset viewer.