Making WordPress.org


Ignore:
Timestamp:
10/19/2016 02:30:54 AM (9 years ago)
Author:
dd32
Message:

Plugin Directory: Move the Stats from wp-admin to the front-end /$plugin/admin/ screen.
This also implements the capabilities required for access to the plugin admin screen for each plugin.

See #2111

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php

    r4224 r4260  
    8989            <div>
    9090                <a class="plugin-download button download-button button-large" href="<?php echo esc_url( Template::download_link() ); ?>" itemprop="downloadUrl"><?php _e( 'Download', 'wporg-plugins' ); ?></a>
    91                 <?php if ( true /* TODO: Logic on when to show the edit link */ ) : ?>
     91                <?php if ( current_user_can( 'plugin_admin_view', get_post() ) ) : ?>
    9292                    <br>
    93                     <a class="plugin-edit" href="<?php echo esc_url( get_permalink() . 'admin/' ); ?>"><?php _e( 'Edit Plugin', 'wporg-plugins' ); ?></a>   
     93                    <a class="plugin-edit" href="<?php echo esc_url( get_permalink() . 'admin/' ); ?>"><?php _e( 'Edit Plugin', 'wporg-plugins' ); ?></a>
    9494                <?php endif; ?>
    9595            </div>
Note: See TracChangeset for help on using the changeset viewer.