Making WordPress.org


Ignore:
Timestamp:
03/24/2019 10:02:15 PM (6 years ago)
Author:
ocean90
Message:

Translate: Add an info notice about language build status for themes and plugins.

Props Nao.
Fixes #4251.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-locale.php

    r8497 r8501  
    191191        $sub_project_slugs = array();
    192192        if ( $sub_projects ) {
     193            $sub_project_ids      = array();
    193194            $sub_project_statuses = array();
    194195            foreach ( $sub_projects as $key => $_sub_project ) {
     
    196197                $status = $this->get_project_status( $_sub_project, $locale_slug, $set_slug, null, false );
    197198
    198                 $sub_project_statuses[ $_sub_project->id ] = $status;
    199             }
    200 
    201             $variants = $this->get_locale_variants( $locale_slug, array_keys( $sub_project_statuses ) );
     199                $sub_project_ids[] = $_sub_project->id;
     200
     201                $sub_project_statuses[ $_sub_project->slug ] = $status;
     202            }
     203
     204            $variants = $this->get_locale_variants( $locale_slug, $sub_project_ids );
     205
     206            unset( $sub_project_ids );
    202207        } else {
    203208            $variants = $this->get_locale_variants( $locale_slug, array( $sub_project->id ) );
Note: See TracChangeset for help on using the changeset viewer.