Ticket #4694: 4694-1.diff
File 4694-1.diff, 2.4 KB (added by , 5 years ago) |
---|
-
trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/inc/template-tags.php
209 209 break; 210 210 211 211 case 'disabled': 212 $message = current_user_can( 'plugin_approve' )213 ? __( 'This plugin is disabled (closed, but actively serving updates).', 'wporg-plugins' )214 : __( 'This plugin has been closed for new installations.', 'wporg-plugins' );215 216 $message = sprintf( $error_notice, $message );217 break;218 219 212 case 'closed': 220 213 $closed_date = get_post_meta( get_the_ID(), 'plugin_closed_date', true ); 221 214 222 215 if ( $closed_date ) { 223 /* translators: %s: plugin closing date */224 $message = sprintf( __( 'This plugin was closed on %s and is no longer available for download.', 'wporg-plugins' ), mysql2date( get_option( 'date_format' ), $closed_date ) );225 216 217 if ( 'disabled' === $post_status && current_user_can( 'plugin_approve' ) ) { 218 /* translators: %s: plugin closing date */ 219 $message = sprintf( __( 'This plugin has been disabled as of %s -- this means it is closed, but actively serving updates.', 'wporg-plugins' ), mysql2date( get_option( 'date_format' ), $closed_date ) ); 220 } else { 221 /* translators: %s: plugin closing date */ 222 $message = sprintf( __( 'This plugin has been closed as of %s and is not available for download.', 'wporg-plugins' ), mysql2date( get_option( 'date_format' ), $closed_date ) ); 223 } 224 226 225 $days_passed = (int) ( ( current_time( 'timestamp' ) - mysql2date( 'U', $closed_date ) ) / DAY_IN_SECONDS ); 227 226 228 227 // Display close reason if more than 60 days have passed. 229 228 if ( $days_passed > 60 ) { 230 229 /* translators: %s: plugin close/disable reason */ 231 $message .= ' ' . sprintf( __( 'Reason: %s.', 'wporg-plugins' ), Template::get_close_reason( $post ) ); 230 $message .= ' ' . sprintf( __( 'Reason: %s.', 'wporg-plugins' ), Template::get_close_reason( $post ) ); 231 } else { 232 $message .= ' ' . __( 'This closure is temporary, pending a full review.', 'wporg-plugins' ); 232 233 } 234 233 235 } else { 234 236 $message = __( 'This plugin has been closed and is no longer available for download.', 'wporg-plugins' ); 235 237 }