Making WordPress.org


Ignore:
Timestamp:
09/23/2017 03:55:48 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Convert Ratings_Compat and Stickies_Compat constructor arguments to an array.

File:
1 edited

Legend:

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

    r5868 r5960  
    295295            // Instantiate WPORG_Ratings compat mode for reviews.
    296296            if ( class_exists( 'WPORG_Ratings' ) && class_exists( 'WordPressdotorg\Forums\Ratings_Compat' ) ) {
    297                 $this->ratings = new Ratings_Compat( $this->compat(), $this->slug(), $this->taxonomy(), $this->get_object( $this->slug() ) );
     297                $this->ratings = new Ratings_Compat( array(
     298                    'compat'   => $this->compat(),
     299                    'slug'     => $this->slug(),
     300                    'taxonomy' => $this->taxonomy(),
     301                    'object'   => $this->get_object( $this->slug() ),
     302                ) );
    298303            }
    299304
    300305            // Instantiate WPORG_Stickies mode for support view.
    301306            if ( class_exists( 'WordPressdotorg\Forums\Stickies_Compat' ) ) {
    302                 $this->stickies = new Stickies_Compat( $this->compat(), $this->slug(), $this->taxonomy(), $this->get_object( $this->slug() ), $this->term );
     307                $this->stickies = new Stickies_Compat( array(
     308                    'compat'   => $this->compat(),
     309                    'slug'     => $this->slug(),
     310                    'taxonomy' => $this->taxonomy(),
     311                    'object'   => $this->get_object( $this->slug() ),
     312                    'term'     => $this->term,
     313                ) );
    303314            }
    304315
     
    329340                // Instantiate WPORG_Ratings compat mode for reviews.
    330341                if ( class_exists( 'WPORG_Ratings' ) && class_exists( 'WordPressdotorg\Forums\Ratings_Compat' ) ) {
    331                     $this->ratings = new Ratings_Compat( $this->compat(), $this->slug(), $this->taxonomy(), $this->get_object( $this->slug() ) );
     342                    $this->ratings = new Ratings_Compat( array(
     343                        'compat'   => $this->compat(),
     344                        'slug'     => $this->slug(),
     345                        'taxonomy' => $this->taxonomy(),
     346                        'object'   => $this->get_object( $this->slug() ),
     347                    ) );
    332348                }
    333349
    334350                // Instantiate WPORG_Stickies mode for topic view.
    335351                if ( class_exists( 'WordPressdotorg\Forums\Stickies_Compat' ) ) {
    336                     $this->stickies = new Stickies_Compat( $this->compat(), $this->slug(), $this->taxonomy(), $this->get_object( $this->slug() ), $this->term, $this->authors, $this->contributors, $this->support_reps );
     352                    $this->stickies = new Stickies_Compat( array(
     353                        'compat'       => $this->compat(),
     354                        'slug'         => $this->slug(),
     355                        'taxonomy'     => $this->taxonomy(),
     356                        'object'       => $this->get_object( $this->slug() ),
     357                        'term'         => $this->term,
     358                        'authors'      => $this->authors,
     359                        'contributors' => $this->contributors,
     360                        'support_reps' => $this->support_reps,
     361                    ) );
    337362                }
    338363
Note: See TracChangeset for help on using the changeset viewer.