WordPress.org

Making WordPress.org


Ignore:
Timestamp:
04/05/2017 04:50:33 AM (2 years ago)
Author:
dd32
Message:

Plugin Directory: Rename the Admin section to Advanced and enable all users to view it (including logged out anonymous users).

See #2365

File:
1 moved

Legend:

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

    r5243 r5248  
    1515);
    1616
    17 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Meta',            array(), $widget_args );
    18 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Committers',      array(), $widget_args );
    19 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Contributors',    array(), array(
     17the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Meta',    array(), $widget_args );
     18the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Ratings',    array(), $widget_args );
     19the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Support',    array(), $widget_args );
     20   
     21// If the user is not a contributor/committer for the plugin, we'll show the Donate metabox instead of the committer metabox.
     22if ( current_user_can( 'plugin_admin_view', $post ) ) {
     23    the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Committers', array(), $widget_args );
     24} else {
     25    the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Donate', array(), $widget_args );
     26}
     27
     28the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Contributors', array(), array(
    2029    'before_title' => '<h4 class="widget-title">',
    2130    'after_title'  => '</h4>',
Note: See TracChangeset for help on using the changeset viewer.