Changeset 12565 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload.php
- Timestamp:
- 04/27/2023 01:44:34 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload.php
r12508 r12565 76 76 77 77 else : 78 $plugins = wp_count_posts( 'plugin', 'readable' ); 78 $plugins = wp_count_posts( 'plugin', 'readable' ); 79 $oldest_plugin = get_posts( [ 'post_type' => 'plugin', 'post_status' => 'new', 'order' => 'ASC', 'orderby' => 'post_date_gmt', 'numberposts' => 1 ] ); 80 $queue_length = floor( ( time() - strtotime( $oldest_plugin[0]->post_date_gmt ?? 'now' ) ) / DAY_IN_SECONDS ); 79 81 ?> 80 82 … … 93 95 'wporg-plugins' 94 96 ) ), 95 '<strong>' . $plugins->new . '</strong>' 97 '<strong>' . number_format_i18n( $plugins->new ) . '</strong>' 98 ); 99 } 100 101 // If the queue is currently beyond 10 days, display a warning to that effect. 102 if ( $queue_length > 10 ) { 103 echo '</p><p>'; 104 esc_html_e( 'The review queue is currently longer than normal, we apologize for the delays and ask for patience.', 'wporg-plugins' ); 105 106 echo '</p><p>'; 107 printf( 108 /* translators: %s: Number of days. Only displayed if > 10 */ 109 esc_html( _n( 110 'The current wait for an initial review is at least %s day.', 111 'The current wait for an initial review is at least %s days.', 112 $queue_length, 113 'wporg-plugins' 114 ) ), 115 '<strong>' . number_format_i18n( $queue_length ) . '</strong>' 96 116 ); 97 117 }
Note: See TracChangeset
for help on using the changeset viewer.