Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 55 additions & 11 deletions src/wp-admin/includes/class-wp-plugins-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -1567,18 +1567,62 @@
return;
}

$links = array();
foreach ( $dependency_names as $slug => $name ) {
$links[] = $this->get_dependency_view_details_link( $name, $slug );
}
$requires = null;

Check failure on line 1571 in src/wp-admin/includes/class-wp-plugins-list-table.php

View workflow job for this annotation

GitHub Actions / Coding standards / PHP checks

Whitespace found at end of line
if ( ! empty( $dependency_names ) ) {

$is_active = is_multisite() ? is_plugin_active_for_network( $dependent ) : is_plugin_active( $dependent );
$comma = wp_get_list_item_separator();
$requires = sprintf(
/* translators: %s: List of dependency names. */
__( '<strong>Requires:</strong> %s' ),
implode( $comma, $links )
);
$links = array();

foreach ( $dependency_names as $slug => $name ) {
$link = $this->get_dependency_view_details_link( $name, $slug );

Check failure on line 1578 in src/wp-admin/includes/class-wp-plugins-list-table.php

View workflow job for this annotation

GitHub Actions / Coding standards / PHP checks

Whitespace found at end of line
$dependency_file = WP_Plugin_Dependencies::get_dependency_filepath( $slug );

$is_installed = false;
$is_active = false;

if ( $dependency_file ) {
$is_installed = true;
$is_active = is_multisite()
? is_plugin_active_for_network( $dependency_file ) || is_plugin_active( $dependency_file )
: is_plugin_active( $dependency_file );
}

if ( ! $is_installed ) {
$link .= sprintf(
' <span class="dependency-state dependency-state--missing">%s</span>
<span class="screen-reader-text">%s</span>',
__( '(not installed)' ),
__( 'Not installed' )
);
} elseif ( $is_active ) {
$link .= sprintf(
' <span class="dependency-state dependency-state--active">%s</span>
<span class="dashicons dashicons-yes-alt dependency-icon dependency-icon--active" aria-hidden="true"></span>
<span class="screen-reader-text">%s</span>',
__( '(installed, active)' ),
__( 'Installed and active' )
);
} else {
$link .= sprintf(
' <span class="dependency-state dependency-state--installed">%s</span>
<span class="dashicons dashicons-yes-alt dependency-icon dependency-icon--installed" aria-hidden="true"></span>
<span class="screen-reader-text">%s</span>',
__( '(installed, inactive)' ),
__( 'Installed but inactive' )
);
}

$links[] = $link;
}

$comma = wp_get_list_item_separator();
$requires = sprintf(
/* translators: %s: List of dependency names. */
__( '<strong>Requires:</strong> %s' ),
implode( $comma, $links )
);
}

$notice = '';
$error_message = '';
Expand Down
5 changes: 5 additions & 0 deletions src/wp-admin/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,11 @@
$class = 'all-options disabled';
}
} else {
if ( in_array( $option->option_name, array( 'siteurl', 'home' ), true ) && defined( 'WP_' . strtoupper( $option->option_name ) ) ) {
// If a setting is defined in wp-config.php, disable the respective field.
$disabled = true;
}

$value = $option->option_value;
$options_to_update[] = $option->option_name;
$class = 'all-options';
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ function wp_default_scripts( $scripts ) {
'file_cancelled' => __( 'File canceled.' ),
'upload_stopped' => __( 'Upload stopped.' ),
'dismiss' => __( 'Dismiss' ),
'crunching' => __( 'Crunching&hellip;' ),
'processing' => __( 'Processing&hellip;' ),
'deleted' => __( 'moved to the Trash.' ),
/* translators: %s: File name. */
'error_uploading' => __( '&#8220;%s&#8221; has failed to upload.' ),
Expand Down
Loading