Skip to:
Content

bbPress.org


Ignore:
Timestamp:
03/01/2017 02:17:21 AM (9 years ago)
Author:
johnjamesjacoby
Message:

Engagements: Integrate the user_query into favorites, subscriptions, and engagements.

  • Add to admin metabox avatar loops
  • Fix a few bugs in BBP_User_Query, and include a custom constructor to set the loop counter

See #3068.

File:
1 edited

Legend:

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

    r6312 r6334  
    8181        add_action( 'add_meta_boxes', array( $this, 'author_metabox'        ) );
    8282        add_action( 'add_meta_boxes', array( $this, 'replies_metabox'       ) );
     83        add_action( 'add_meta_boxes', array( $this, 'engagements_metabox'   ) );
    8384        add_action( 'add_meta_boxes', array( $this, 'favorites_metabox'     ) );
    8485        add_action( 'add_meta_boxes', array( $this, 'subscriptions_metabox' ) );
     
    408409            'normal',
    409410            'high'
     411        );
     412    }
     413
     414    /**
     415     * Add the engagements meta-box
     416     *
     417     * Allows viewing of users who have engaged in a topic.
     418     *
     419     * @since 2.6.0 bbPress (r6333)
     420     *
     421     * @uses add_meta_box() To add the meta-box
     422     */
     423    public function engagements_metabox() {
     424
     425        // Bail when creating a new topic
     426        if ( empty( $_GET['action'] ) || ( 'edit' !== $_GET['action'] ) ) {
     427            return;
     428        }
     429
     430        // Bail if no engagements
     431        if ( ! bbp_is_engagements_active() ) {
     432            return;
     433        }
     434
     435        // Add the meta-box
     436        add_meta_box(
     437            'bbp_topic_engagements_metabox',
     438            __( 'Engagements', 'bbpress' ),
     439            'bbp_topic_engagements_metabox',
     440            $this->post_type,
     441            'side',
     442            'low'
    410443        );
    411444    }
Note: See TracChangeset for help on using the changeset viewer.