Skip to:
Content

bbPress.org


Ignore:
Timestamp:
09/17/2012 12:03:03 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Capabilities:

  • Remove experimental Bozo functionality. We can use the 'participate' to prevent forum participation without creating topics or replies.
  • Introduce functions to reset, save, and remove user capabilities.
  • Use these functions in both theme-side and admin-side profiles.
  • Add capabilities to bbp-twentyten theme. This will be moved into the stand-alone bbp-twentyten theme soon'ish.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bbp-includes/bbp-topic-functions.php

    r4218 r4222  
    243243    if ( !bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) {
    244244        $topic_status = bbp_get_pending_status_id();
    245 
    246     // Maybe set as bozo status
    247     } elseif ( bbp_is_user_bozo() ) {
    248         $topic_status = bbp_get_bozo_status_id();
    249245
    250246    // Default to published
     
    438434
    439435    // Define local variable(s)
    440     $topic = $topic_id = $forum_id = $anonymous_data = 0;
     436    $topic = $topic_id = $topic_author = $forum_id = $anonymous_data = 0;
    441437    $topic_title = $topic_content = $topic_edit_reason = '';
    442438
     
    463459
    464460        // Check users ability to create new topic
    465         if ( !bbp_is_topic_anonymous( $topic_id ) ) {
     461        if ( ! bbp_is_topic_anonymous( $topic_id ) ) {
    466462
    467463            // User cannot edit this topic
     
    470466            }
    471467
     468            // Set topic author
     469            $topic_author = bbp_get_topic_author_id( $topic_id );
     470
    472471        // It is an anonymous post
    473472        } else {
     
    550549    /** Topic Blacklist *******************************************************/
    551550   
    552     if ( !bbp_check_for_blacklist( $anonymous_data, bbp_get_topic_author_id( $topic_id ), $topic_title, $topic_content ) )
     551    if ( !bbp_check_for_blacklist( $anonymous_data, $topic_author, $topic_title, $topic_content ) )
    553552        bbp_add_error( 'bbp_topic_blacklist', __( '<strong>ERROR</strong>: Your topic cannot be edited at this time.', 'bbpress' ) );
    554553
     
    558557    if ( !bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) {
    559558        $topic_status = bbp_get_pending_status_id();
    560 
    561     // Maybe set as bozo status
    562     } elseif ( bbp_is_user_bozo() ) {
    563         $topic_status = bbp_get_bozo_status_id();
    564559
    565560    // Default to published
     
    610605        'post_status'  => $topic_status,
    611606        'post_parent'  => $forum_id,
    612         'post_author'  => $topic->post_author,
     607        'post_author'  => $topic_author,
    613608        'post_type'    => bbp_get_topic_post_type(),
    614609        'tax_input'    => $terms,
     
    664659
    665660        // Update counts, etc...
    666         do_action( 'bbp_edit_topic', $topic_id, $forum_id, $anonymous_data, $topic->post_author , true /* Is edit */ );
     661        do_action( 'bbp_edit_topic', $topic_id, $forum_id, $anonymous_data, $topic_author , true /* Is edit */ );
    667662
    668663        // If the new forum id is not equal to the old forum id, run the
Note: See TracChangeset for help on using the changeset viewer.