Making WordPress.org


Ignore:
Timestamp:
12/08/2016 01:58:37 PM (10 years ago)
Author:
obenland
Message:

Plugin Directory: Use get_post() for template functions.

Template functions should fall back to the global post object.
Also fixes a bug where assets weren't loaded correctly while in the loop.

Props joostdevalk for initial patch.
Fixes #2303.

File:
1 edited

Legend:

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

    r4423 r4505  
    180180        if ( $first_banner = reset( $assets['banner'] ) ) {
    181181            // The Banners are not stored locally, which is why a URL is used here
    182             $banner_average_color = Tools::get_image_average_color( Template::get_asset_url( $plugin_slug, $first_banner ) );
     182            $banner_average_color = Tools::get_image_average_color( Template::get_asset_url( $plugin, $first_banner ) );
    183183        }
    184184        update_post_meta( $plugin->ID, 'assets_banners_color', wp_slash( $banner_average_color ) );
Note: See TracChangeset for help on using the changeset viewer.