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/shortcodes/class-screenshots.php

    r4471 r4505  
    3131                foreach ( $screen_shots as $image ) {
    3232                        $screen_shot = sprintf( '<a href="%1$s" rel="nofollow"><img class="screenshot" src="%1$s" alt="" /></a>',
    33                                 Template::get_asset_url( $plugin->post_name, $image )
     33                                Template::get_asset_url( $plugin, $image )
    3434                        );
    3535
Note: See TracChangeset for help on using the changeset viewer.