Making WordPress.org


Ignore:
Timestamp:
10/02/2016 08:44:07 PM (8 years ago)
Author:
ocean90
Message:

Translate, Stats Overview: Limit number of WordPress projects to a maximum of three.

File:
1 edited

Legend:

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

    r3002 r4180  
    2929        // I'm sure there's somewhere to fetch these from statically defined
    3030        $wp_project = GP::$project->by_path( 'wp' );
     31        $previous_wp_version = WP_CORE_STABLE_BRANCH - 0.1;
    3132        foreach ( GP::$project->find_many( array( 'parent_project_id' => $wp_project->id, 'active' => 1 ), 'name ASC' ) as $wp_sub_project ) {
    32             // Prefix the WordPress projects...
    33             $wp_sub_project->name = $wp_project->name . ' ' . $wp_sub_project->name;
    34             $projects = array_merge( array( $wp_sub_project->path => $wp_sub_project ), $projects );
     33            if ( 'dev' === $wp_sub_project->slug || version_compare( $previous_wp_version, (float) $wp_sub_project->name, '<=' ) ) {
     34                // Prefix the WordPress projects...
     35                $wp_sub_project->name = $wp_project->name . ' ' . $wp_sub_project->name;
     36                $projects  = array_merge( array( $wp_sub_project->path => $wp_sub_project ), $projects );
     37            }
    3538        }
    3639
Note: See TracChangeset for help on using the changeset viewer.