Making WordPress.org


Ignore:
Timestamp:
04/26/2016 07:33:28 AM (9 years ago)
Author:
dd32
Message:

Plugin Directory: Add a Review Widget to the theme, and all the other required things for Widgets.
This adds a namespace to the theme and begins to reduce the duplication of template functionality between wp-admin and the theme.

See #1584.
Fixes #1575.

File:
1 edited

Legend:

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

    r2654 r3009  
    11<?php
     2namespace WordPressdotorg\Plugin_Directory\Theme;
     3use WordPressdotorg\Plugin_Directory\Template;
     4
    25the_post();
    36get_header();
    4 $plugin_banners = WordPressdotorg\Plugin_Directory\Template::get_plugin_banner( $post );
     7$plugin_banners = Template::get_plugin_banner( $post );
    58
    69?>
     
    4649                        <ul id="sections">
    4750                            <?php
    48                             foreach ( WordPressdotorg\Plugin_Directory\Template::get_plugin_sections() as $section ) {
     51                            foreach ( Template::get_plugin_sections() as $section ) {
    4952                                $current = ( $section['slug'] == get_query_var( 'content_page' ) || ( 'description' == $section['slug'] && ! get_query_var( 'content_page' ) ) );
    5053                                printf(
     
    6669
    6770            <div class="" style="width: 212px; float: right;">
    68                 <p>
    69                     <strong>Version:</strong> <?php echo wporg_plugins_the_version(); ?><br>
    70                     <strong>Requires:</strong> <?php printf( __('%s or higher', 'wporg-plugins' ), wporg_plugins_template_requires() ); ?><br>
    71                     <strong>Compatible up to:</strong> <?php echo wporg_plugins_template_compatible_up_to(); ?><br>
    72                     <strong>Last Updated: </strong> <?php echo wporg_plugins_template_last_updated(); ?><br>
    73                     <strong>Active Installs:</strong> <?php echo worg_plugins_template_active_installs( false ); ?><br>
    74                     <meta itemprop="dateModified" content="<?php the_time('Y-m-d'); ?>" />
    75                 </p>
     71                <?php dynamic_sidebar('single-plugin-sidebar'); ?>
    7672            </div>
    7773
Note: See TracChangeset for help on using the changeset viewer.