Making WordPress.org


Ignore:
Timestamp:
09/03/2017 09:46:04 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Introduce Directory_Compat::get_support_reps() method to retrieve users assigned as the plugin/theme support reps.

See #2699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-stickies-compat.php

    r5749 r5868  
    1313    var $term     = null;
    1414
    15     public function __construct( $compat, $slug, $taxonomy, $object, $term, $authors = array(), $contributors = array() ) {
     15    public function __construct( $compat, $slug, $taxonomy, $object, $term, $authors = array(), $contributors = array(), $support_reps = array() ) {
    1616        if ( empty( $compat ) || empty( $slug ) || empty( $taxonomy ) || empty( $object ) || empty( $term ) ) {
    1717            return;
     
    2525        $this->authors      = $authors;
    2626        $this->contributors = $contributors;
     27        $this->support_reps = $support_reps;
    2728
    2829        // Remove global stickies from sticky array.
     
    248249                $retval = true;
    249250            }
     251
     252            // Compat support reps.
     253            if ( $this->support_reps && in_array( $user->user_nicename, $this->support_reps ) ) {
     254                $retval = true;
     255            }
    250256        }
    251257        return $retval;
Note: See TracChangeset for help on using the changeset viewer.