Skip to:
Content

bbPress.org


Ignore:
Timestamp:
09/21/2017 04:13:04 AM (7 years ago)
Author:
johnjamesjacoby
Message:

Capabilities: first pass at single topic-tag cap mappings.

This change adds IDs where appropriate, and introduces single term cap checks with intelligent comparisons that match the approach used by forums, topics, and replies.

  • Inactive users cannot assign, manage, edit, or delete
  • Moderators can assign, manage, edit, and delete
  • Participants can assign
  • Spectators & Blocked users still cannot manipulate topic tags in any way

This prepares bbPress for third-party plugins to leverage topic-tags in ways it otherwise wasn't prepared to do.

See #3167.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/templates/default/bbpress/form-reply.php

    r6594 r6714  
    8383                    <?php endif; ?>
    8484
    85                     <?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags' ) ) : ?>
     85                    <?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags', bbp_get_topic_id() ) ) : ?>
    8686
    8787                        <?php do_action( 'bbp_theme_before_reply_form_tags' ); ?>
Note: See TracChangeset for help on using the changeset viewer.