Skip to:
Content

bbPress.org


Ignore:
Timestamp:
03/27/2018 07:38:26 PM (6 years ago)
Author:
johnjamesjacoby
Message:

Admin: improve topic/reply row-action UX.

This change includes a few improvements to how topics and replies are toggled from an admin area list-table:

  • Make approve & not-spam links green to match comments UI
  • More specifically target admin area links to avoid conflicts with other post types
  • Make "Approve" a blanket "publish" action, meaning it will always publish a topic/reply even from spam or trash
  • Make sure "Not Spam" will restore to "pending" if it was previously not published
  • Bump CSS version

See #1799.

File:
1 edited

Legend:

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

    r6784 r6790  
    28532853    }
    28542854
     2855    // Get new status
     2856    $status = bbp_get_spam_status_id();
     2857
    28552858    // Bail if topic is spam
    2856     if ( bbp_get_spam_status_id() === $topic->post_status ) {
     2859    if ( $status === $topic->post_status ) {
    28572860        return false;
    28582861    }
     
    28652868
    28662869    // Set post status to spam
    2867     $topic->post_status = bbp_get_spam_status_id();
     2870    $topic->post_status = $status;
    28682871
    28692872    // Empty the topic of its tags
     
    31563159    }
    31573160
     3161    // Get new status
     3162    $status = bbp_get_public_status_id();
     3163
    31583164    // Bail if already approved
    3159     if ( bbp_get_pending_status_id() !== $topic->post_status ) {
     3165    if ( $status === $topic->post_status ) {
    31603166        return false;
    31613167    }
     
    31963202    }
    31973203
     3204    // Get new status
     3205    $status = bbp_get_pending_status_id();
     3206
    31983207    // Bail if already pending
    3199     if ( bbp_get_pending_status_id() === $topic->post_status ) {
     3208    if ( $status === $topic->post_status ) {
    32003209        return false;
    32013210    }
     
    32053214
    32063215    // Set pending status
    3207     $topic->post_status = bbp_get_pending_status_id();
     3216    $topic->post_status = $status;
    32083217
    32093218    // No revisions
Note: See TracChangeset for help on using the changeset viewer.