Changeset 11806 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-release-confirmation.php
- Timestamp:
- 04/28/2022 03:42:10 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-release-confirmation.php
r11628 r11806 37 37 // Remove closed plugins. 38 38 $plugins = array_filter( $plugins, function( $plugin ) { 39 return $plugin && 'publish' === $plugin->post_status;39 return ( $plugin && in_array( $plugin->post_status, array( 'publish', 'disabled' ) ) ); 40 40 } ); 41 41 … … 232 232 233 233 if ( ! $current_user_confirmed && ! $data['confirmed'] ) { 234 if ( self::can_access() ) { 234 if ( 235 self::can_access() && 236 current_user_can( 'plugin_manage_releases', $plugin ) 237 ) { 235 238 $buttons[] = sprintf( 236 239 '<a href="%s" class="button approve-release button-primary">%s</a>', … … 257 260 258 261 static function can_access() { 262 // Plugin reviewers can always access the release management functionality. 263 if ( current_user_can( 'plugin_review' ) ) { 264 return true; 265 } 266 259 267 // Must have an access token.. 260 268 if ( ! is_user_logged_in() || empty( $_COOKIE[ self::COOKIE ] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.