- Timestamp:
- 03/05/2024 06:25:22 AM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r57714 r57769 1568 1568 } 1569 1569 1570 $dependency_note = __( 'Note: This plugin cannot be activated until the plugins that are required by it are activated.' ); 1571 1572 $comma = wp_get_list_item_separator(); 1573 $requires = sprintf( 1570 $is_active = is_multisite() ? is_plugin_active_for_network( $dependent ) : is_plugin_active( $dependent ); 1571 $comma = wp_get_list_item_separator(); 1572 $requires = sprintf( 1574 1573 /* translators: %s: List of dependency names. */ 1575 1574 __( '<strong>Requires:</strong> %s' ), … … 1577 1576 ); 1578 1577 1578 $notice = ''; 1579 $error_message = ''; 1580 if ( WP_Plugin_Dependencies::has_unmet_dependencies( $dependent ) ) { 1581 if ( $is_active ) { 1582 $error_message = __( 'This plugin is active but may not function correctly because required plugins are missing or inactive.' ); 1583 } else { 1584 $error_message = __( 'This plugin cannot be activated because required plugins are missing or inactive.' ); 1585 } 1586 $notice = wp_get_admin_notice( 1587 $error_message, 1588 array( 1589 'type' => 'error', 1590 'additional_classes' => array( 'inline', 'notice-alt' ), 1591 ) 1592 ); 1593 } 1594 1579 1595 printf( 1580 1596 '<div class="requires"><p>%1$s</p><p>%2$s</p></div>', 1581 1597 $requires, 1582 $ dependency_note1598 $notice 1583 1599 ); 1584 1600 }
Note: See TracChangeset
for help on using the changeset viewer.