Changeset 14521 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
- Timestamp:
- 09/03/2025 01:43:39 AM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php
r14504 r14521 1134 1134 1135 1135 if ( 1136 // Assume by-author-request is permanent. 1136 1137 'author-request' === $result['reason'] || 1138 // Likewise for when it's closed due to merged-to-core. 1139 'merged-into-core' === $result['reason'] || 1140 // Or if it's closed without committers. 1137 1141 ! Tools::get_plugin_committers( $post->post_name ) 1138 1142 ) { … … 1148 1152 } 1149 1153 1150 // If it's closed for more than 60 days, it's by author request, or we're unsure about the close date, it's publicly known. 1154 // These reasons are never embargoed, and are shown immediately. 1155 $unembargoed_closure_reasons = array( 1156 'author-request', 1157 'unused', 1158 'merged-into-core', 1159 ); 1160 1161 // If it's closed for more than 60 days, it's not embargoed, or we're unsure about the close date, it's publicly known. 1151 1162 $days_closed = $result['date'] ? (int) ( ( time() - strtotime( $result['date'] ) ) / DAY_IN_SECONDS ) : false; 1152 if ( ! $result['date'] || $days_closed >= 60 || 'author-request' === $result['reason']) {1163 if ( ! $result['date'] || $days_closed >= 60 || in_array( $result['reason'], $unembargoed_closure_reasons, true ) ) { 1153 1164 $result['public'] = true; 1154 1165 }
Note: See TracChangeset
for help on using the changeset viewer.