Making WordPress.org


Ignore:
Timestamp:
07/02/2019 05:56:38 AM (6 years ago)
Author:
dd32
Message:

Plugin Directory: Cache the available language packs for a plugin. This doesn't affect the Language pack API's, only the public facing data in the directory.

File:
1 edited

Legend:

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

    r9016 r9017  
    972972        $post = get_post( $post_id );
    973973
    974         // Only translate Plugin post objects
     974        // Only translate Plugin post objects.
    975975        if ( $post && 'plugin' === $post->post_type ) {
    976976            return Plugin_I18n::instance()->translate( $section, $content, [ 'post_id' => $post_id ] );
     
    990990        $post = get_post( $post_id );
    991991
    992         // Only translate Post type items.
     992        // Only translate Plugin post objects.
    993993        if ( $post && $post->post_type === 'plugin' ) {
    994994            return Plugin_I18n::instance()->translate( 'title', $title, [ 'post_id' => $post ] );
     
    10081008        $post = get_post( $post );
    10091009
    1010         // Only translate Post type items.
     1010        // Only translate Plugin post objects.
    10111011        if ( $post && $post->post_type === 'plugin' ) {
    10121012            return Plugin_I18n::instance()->translate( 'excerpt', $excerpt, [ 'post_id' => $post ] );
Note: See TracChangeset for help on using the changeset viewer.