Changeset 13931 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/inc/template-tags.php
- Timestamp:
- 07/26/2024 04:56:43 AM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins-2024/inc/template-tags.php
r13728 r13931 14 14 use WordPressdotorg\Plugin_Directory\Template; 15 15 use WordPressdotorg\Plugin_Directory\Tools; 16 use WordPressdotorg\Plugin_Directory\Shortcodes\Release_Confirmation; 16 17 17 18 /** … … 258 259 259 260 function the_unconfirmed_releases_notice() { 260 $plugin = get_post(); 261 262 if ( ! $plugin->release_confirmation || ! current_user_can( 'plugin_admin_edit', $plugin ) ) { 263 return; 264 } 265 266 $releases = Plugin_Directory::get_releases( $plugin ) ?: []; 267 $warning = false; 268 269 foreach ( $releases as $release ) { 270 if ( ! $release['confirmed'] && $release['confirmations_required'] && empty( $release['discarded'] ) ) { 271 $warning = true; 272 break; 273 } 274 } 275 276 if ( ! $warning ) { 277 return; 278 } 279 280 printf( 281 '<div class="plugin-notice notice notice-info notice-alt"><p>%s</p></div>', 282 sprintf( 283 __( 'This plugin has <a href="%s">a pending release that requires confirmation</a>.', 'wporg-plugins' ), 284 home_url( '/developers/releases/' ) // TODO: Hardcoded URL. 285 ) 286 ); 261 return Release_Confirmation::frontend_unconfirmed_releases_notice(); 287 262 } 288 263
Note: See TracChangeset
for help on using the changeset viewer.