Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/19/2019 05:47:56 PM (5 years ago)
Author:
johnjamesjacoby
Message:

Slugs: add support for configuring the "Edit" slug.

This commit adds supporting functions and UI for allowing the edit slug to be modified. This omission was originally intentional, as the rewrite rules and pretty permalink support were not fully implemented. Now that they are in 2.6, there is no reason not to allow this slug to be modified.

Related changes include swapping out the new slug setting for the rewrite ID in a few places, and removing a single hardcoded reference to 'edit' that was also overlooked.

Props espellcaste for noticing. Fixes #3285. For 2.7, trunk.

File:
1 edited

Legend:

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

    r6923 r6967  
    24612461        // https://bbpress.trac.wordpress.org/ticket/3054
    24622462        if ( false === strpos( $topic_link, '?' ) ) {
    2463             $url = trailingslashit( $topic_link ) . bbp_get_edit_rewrite_id();
     2463            $url = trailingslashit( $topic_link ) . bbp_get_edit_slug();
    24642464            $url = user_trailingslashit( $url );
    24652465
     
    35843584            // Pretty or ugly URL
    35853585            $retval = bbp_use_pretty_urls()
    3586                 ? user_trailingslashit( trailingslashit( bbp_get_topic_tag_link() ) . bbp_get_edit_rewrite_id() )
     3586                ? user_trailingslashit( trailingslashit( bbp_get_topic_tag_link() ) . bbp_get_edit_slug() )
    35873587                : add_query_arg( array( bbp_get_edit_rewrite_id() => '1' ), bbp_get_topic_tag_link() );
    35883588
Note: See TracChangeset for help on using the changeset viewer.