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/themes/pub/wporg-plugins/template-parts/plugin-single.php

    r4467 r4505  
    6767                        <?php
    6868                        if ( is_user_logged_in() ) :
    69                                 $url = Template::get_favourite_link( $post );
     69                                $url = Template::get_favorite_link();
    7070                                $is_favorited = Tools::favorited_plugin( $post );
    7171                                ?>
     
    141141                                        $section_no_read_mores[] = 'faq';
    142142                                }
    143                                
     143
    144144                                $section_read_more = ! in_array( $section_slug, $section_no_read_mores );
    145145
Note: See TracChangeset for help on using the changeset viewer.