',
+ '
',
$active,
esc_attr( $theme->get_stylesheet() . '-update' ),
esc_attr( $theme->get_stylesheet() ),
@@ -716,7 +719,7 @@ function wp_theme_update_row( $theme_key, $theme ) {
if ( $compatible_wp && $compatible_php ) {
if ( ! current_user_can( 'update_themes' ) ) {
- printf(
+ $compatibility_notice .= sprintf(
/* translators: 1: Theme name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
__( 'There is a new version of %1$s available. View version %4$s details.' ),
$theme['Name'],
@@ -729,7 +732,7 @@ function wp_theme_update_row( $theme_key, $theme ) {
$response['new_version']
);
} elseif ( empty( $response['package'] ) ) {
- printf(
+ $compatibility_notice .= sprintf(
/* translators: 1: Theme name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
__( 'There is a new version of %1$s available. View version %4$s details. Automatic update is unavailable for this theme.' ),
$theme['Name'],
@@ -742,7 +745,7 @@ function wp_theme_update_row( $theme_key, $theme ) {
$response['new_version']
);
} else {
- printf(
+ $compatibility_notice .= sprintf(
/* translators: 1: Theme name, 2: Details URL, 3: Additional link attributes, 4: Version number, 5: Update URL, 6: Additional link attributes. */
__( 'There is a new version of %1$s available. View version %4$s details or update now.' ),
$theme['Name'],
@@ -763,84 +766,90 @@ function wp_theme_update_row( $theme_key, $theme ) {
}
} else {
if ( ! $compatible_wp && ! $compatible_php ) {
- printf(
+ $compatibility_notice .= sprintf(
/* translators: %s: Theme name. */
__( 'There is a new version of %s available, but it does not work with your versions of WordPress and PHP.' ),
$theme['Name']
);
if ( current_user_can( 'update_core' ) && current_user_can( 'update_php' ) ) {
- printf(
+ $compatibility_notice .= sprintf(
/* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
' ' . __( 'Please update WordPress, and then learn more about updating PHP.' ),
self_admin_url( 'update-core.php' ),
esc_url( wp_get_update_php_url() )
);
- wp_update_php_annotation( ' ', '' );
+ $compatibility_notice .= wp_update_php_annotation( ' ', '', false );
} elseif ( current_user_can( 'update_core' ) ) {
- printf(
+ $compatibility_notice .= sprintf(
/* translators: %s: URL to WordPress Updates screen. */
' ' . __( 'Please update WordPress.' ),
self_admin_url( 'update-core.php' )
);
} elseif ( current_user_can( 'update_php' ) ) {
- printf(
+ $compatibility_notice .= sprintf(
/* translators: %s: URL to Update PHP page. */
' ' . __( 'Learn more about updating PHP.' ),
esc_url( wp_get_update_php_url() )
);
- wp_update_php_annotation( ' ', '' );
+ $compatibility_notice .= wp_update_php_annotation( ' ', '', false );
}
} elseif ( ! $compatible_wp ) {
- printf(
+ $compatibility_notice .= sprintf(
/* translators: %s: Theme name. */
__( 'There is a new version of %s available, but it does not work with your version of WordPress.' ),
$theme['Name']
);
if ( current_user_can( 'update_core' ) ) {
- printf(
+ $compatibility_notice .= sprintf(
/* translators: %s: URL to WordPress Updates screen. */
' ' . __( 'Please update WordPress.' ),
self_admin_url( 'update-core.php' )
);
}
} elseif ( ! $compatible_php ) {
- printf(
+ $compatibility_notice .= sprintf(
/* translators: %s: Theme name. */
__( 'There is a new version of %s available, but it does not work with your version of PHP.' ),
$theme['Name']
);
if ( current_user_can( 'update_php' ) ) {
- printf(
+ $compatibility_notice .= sprintf(
/* translators: %s: URL to Update PHP page. */
' ' . __( 'Learn more about updating PHP.' ),
esc_url( wp_get_update_php_url() )
);
- wp_update_php_annotation( ' ', '' );
+ $compatibility_notice .= wp_update_php_annotation( ' ', '', false );
}
}
}
- /**
- * Fires at the end of the update message container in each
- * row of the themes list table.
- *
- * The dynamic portion of the hook name, `$theme_key`, refers to
- * the theme slug as found in the WordPress.org themes repository.
- *
- * @since 3.1.0
- *
- * @param WP_Theme $theme The WP_Theme object.
- * @param array $response {
- * An array of metadata about the available theme update.
- *
- * @type string $new_version New theme version.
- * @type string $url Theme URL.
- * @type string $package Theme update package URL.
- * }
- */
- do_action( "in_theme_update_message-{$theme_key}", $theme, $response ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
-
- echo ' |