Making WordPress.org


Ignore:
Timestamp:
01/24/2017 10:59:27 AM (7 years ago)
Author:
dd32
Message:

Plugin Directory: Use translated data for the api.wordpress.org info endpoint.

  • Also translates screenshot titles on the front end
  • Also uses plugin tags in API info endpoint rather than defunct categories.

See #2112
Fixes #2415

File:
1 edited

Legend:

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

    r4620 r4764  
    454454        }
    455455
    456         if ( 'en_US' != get_locale() ) {
    457             add_filter( 'get_term', array( __NAMESPACE__ . '\I18n', 'translate_term' ) );
    458             add_filter( 'the_content', array( $this, 'translate_post_content' ), 1, 2 );
    459             add_filter( 'the_title', array( $this, 'translate_post_title' ), 1, 2 );
    460             add_filter( 'get_the_excerpt', array( $this, 'translate_post_excerpt' ), 1, 2 );
    461         }
     456        add_filter( 'get_term', array( __NAMESPACE__ . '\I18n', 'translate_term' ) );
     457        add_filter( 'the_content', array( $this, 'translate_post_content' ), 1, 2 );
     458        add_filter( 'the_title', array( $this, 'translate_post_title' ), 1, 2 );
     459        add_filter( 'get_the_excerpt', array( $this, 'translate_post_excerpt' ), 1, 2 );
    462460
    463461        // Instantiate our copy of the Jetpack_Search class.
Note: See TracChangeset for help on using the changeset viewer.