Making WordPress.org

Changeset 10114

Timestamp:
08/05/2020 01:01:52 AM (4 years ago)
Author:
dd32
Message:

Plugin Directory: Search: Index translated content for plugins that release from trunk.

See #2977.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php

    r10000 r10114  
    10621062        $post            = get_post( $post_id );
    10631063        if ( $post ) {
    1064             $translations = Plugin_I18n::instance()->find_all_translations_for_plugin( $post->post_name, 'stable-readme', $min_translated ); // at least $min_translated % translated
     1064            $project = 'stable-readme';
     1065            if ( ! $plugin->stable_tag || 'trunk' === $plugin->stable_tag ) {
     1066                $project = 'dev-readme';
     1067            }
     1068            $translations = Plugin_I18n::instance()->find_all_translations_for_plugin( $post->post_name, $project, $min_translated ); // at least $min_translated % translated
    10651069            if ( $translations ) {
    10661070                // Eliminate translations that start with unwanted prefixes, so we don't waste space on near-duplicates like en_AU, en_CA etc.
Note: See TracChangeset for help on using the changeset viewer.