Making WordPress.org


Ignore:
Timestamp:
10/12/2016 01:03:26 PM (9 years ago)
Author:
dd32
Message:

Plugin Directory: Add the first foundations for the front-end admin/plugin-edit screen.

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

    r4223 r4224  
    8787                </div>
    8888            <?php endif; ?>
     89            <div>
     90                <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 */ ) : ?>
     92                    <br>
     93                    <a class="plugin-edit" href="<?php echo esc_url( get_permalink() . 'admin/' ); ?>"><?php _e( 'Edit Plugin', 'wporg-plugins' ); ?></a>   
     94                <?php endif; ?>
     95            </div>
    8996
    90             <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>
    9197            <meta itemprop="softwareVersion" content="<?php echo esc_attr( get_post_meta( get_the_ID(), 'version', true ) ); ?>">
    9298            <meta itemprop="fileFormat" content="application/zip">
    9399        </div>
    94100
    95         <?php the_title( '<h1 class="plugin-title">', '</h1>' ); ?>
     101        <?php the_title( '<h1 class="plugin-title"><a href="' . esc_url( get_permalink() ) . '">', '</a></h1>' ); ?>
    96102
    97103        <span class="byline"><?php
     
    102108                _x( 'By %s', 'post author', 'wporg-plugins' ),
    103109                '<span class="author vcard">' .
    104                 ( $url ? '<a class="url fn n" href="' . esc_url( $url ) . '">' : '' ) .
     110                ( $url ? '<a class="url fn n" rel="nofollow" href="' . esc_url( $url ) . '">' : '' ) .
    105111                esc_html( Template::encode( $author ) ) .
    106112                ( $url ? '</a>' : '' ) .
     
    112118    <div class="entry-content">
    113119        <?php
     120        if ( get_query_var( 'plugin_admin' ) ) :
     121            get_template_part( 'template-parts/section', 'admin' );
     122        else:
    114123            $plugin_sections = Template::get_plugin_sections();
    115124
     
    129138                get_template_part( 'template-parts/section', $section_slug );
    130139            endforeach;
     140        endif; // plugin_admin
    131141        ?>
    132142    </div><!-- .entry-content -->
Note: See TracChangeset for help on using the changeset viewer.