Changeset 6118 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
- Timestamp:
- 11/14/2017 05:01:46 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php
r5457 r6118 15 15 16 16 $content = Plugin_Directory::instance()->split_post_content_into_pages( get_the_content() ); 17 $status = get_post_status(); 17 18 18 19 ?><article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> … … 25 26 </div><!-- .plugin-notice --> 26 27 <?php endif; ?> 27 <?php if ( 'publish' != get_post()->post_status ) :28 <?php if ( 'publish' !== $status ) : 28 29 $notice_type = 'notice-error'; 29 switch ( get_post()->post_status ) {30 switch ( $status ) { 30 31 case 'draft': 31 32 case 'pending': … … 40 41 41 42 case 'rejected': 42 $message = __( 'This plugin isrejected and is not visible to the public.', 'wporg-plugins' );43 $message = __( 'This plugin has been rejected and is not visible to the public.', 'wporg-plugins' ); 43 44 break; 44 45 45 46 case 'disabled': 46 47 if ( current_user_can( 'plugin_approve' ) ) { 47 $message = __( 'This plugin is disabled (closed, but actively serving updates) and is not visible to the public.', 'wporg-plugins' ); 48 $message = __( 'This plugin is disabled (closed, but actively serving updates).', 'wporg-plugins' ); 49 break; 50 } else { 51 $message = __( 'This plugin has been closed for new installs.', 'wporg-plugins' ); 48 52 break; 49 53 } … … 51 55 default: 52 56 case 'closed': 53 $message = __( 'This plugin is closed and is not visible to the public.', 'wporg-plugins' );57 $message = __( 'This plugin has been closed and is no longer available for download.', 'wporg-plugins' ); 54 58 break; 55 59 } … … 58 62 <p><?php echo $message; ?></p> 59 63 </div><!-- .plugin-notice --> 64 65 <?php if ( in_array( $status, array( 'closed', 'disabled' ) ) && get_current_user_id() == get_post()->post_author ) : ?> 66 <div class="plugin-notice notice notice-info notice-alt"> 67 <p><?php 68 printf( 69 /* translators: 1: plugins@wordpress.org */ 70 __( 'If you did not request this change, please contact <a href="mailto:%1$s">%1$s</a> for a status. All developers with commit access are contacted when a plugin is closed, with the reasons why, so check your spam email too.', 'wporg-plugins' ), 71 'plugins@wordpress.org' 72 ); 73 ?></p> 74 </div><!-- .plugin-notice --> 75 <?php endif; ?> 60 76 <?php endif; ?> 61 77 … … 96 112 <?php endif; ?> 97 113 98 <a class="plugin-download button download-button button-large" href="<?php echo esc_url( Template::download_link() ); ?>"><?php _e( 'Download', 'wporg-plugins' ); ?></a> 114 <?php if ( 'publish' === get_post_status() || current_user_can( 'plugin_admin_view', get_post() ) ) : ?> 115 <a class="plugin-download button download-button button-large" href="<?php echo esc_url( Template::download_link() ); ?>"><?php _e( 'Download', 'wporg-plugins' ); ?></a> 116 <?php endif; ?> 99 117 </div> 100 118
Note: See TracChangeset
for help on using the changeset viewer.