$plugin_data ) {
$plugin_data = (object) _get_plugin_data_markup_translate( $plugin_file, (array) $plugin_data, false, true );
$icon = ‘‘;
$preferred_icons = array( ‘svg’, ‘2x’, ‘1x’, ‘default’ );
foreach ( $preferred_icons as $preferred_icon ) {
if ( ! empty( $plugin_data->update->icons[ $preferred_icon ] ) ) {
$icon = ‘‘;
break;
}
}
// Get plugin compat for running version of WordPress.
if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $cur_wp_version, ‘>=’ ) ) {
/* translators: %s: WordPress version. */
$compat = ‘
‘ . sprintf( __( ‘Compatibility with WordPress %s: 100%% (according to its author)’ ), $cur_wp_version );
} else {
/* translators: %s: WordPress version. */
$compat = ‘
‘ . sprintf( __( ‘Compatibility with WordPress %s: Unknown’ ), $cur_wp_version );
}
// Get plugin compat for updated version of WordPress.
if ( $core_update_version ) {
if ( isset( $plugin_data->update->tested ) && version_compare( $plugin_data->update->tested, $core_update_version, ‘>=’ ) ) {
/* translators: %s: WordPress version. */
$compat .= ‘
‘ . sprintf( __( ‘Compatibility with WordPress %s: 100%% (according to its author)’ ), $core_update_version );
} else {
/* translators: %s: WordPress version. */
$compat .= ‘
‘ . sprintf( __( ‘Compatibility with WordPress %s: Unknown’ ), $core_update_version );
}
}
$requires_php = isset( $plugin_data->update->requires_php ) ? $plugin_data->update->requires_php : null;
$compatible_php = is_php_version_compatible( $requires_php );
if ( ! $compatible_php && current_user_can( ‘update_php’ ) ) {
$compat .= ‘
‘ . __( ‘This update does not work with your version of PHP.’ ) . ‘ ‘;
$compat .= sprintf(
/* translators: %s: URL to Update PHP page. */
__( ‘Learn more about updating PHP.’ ),
esc_url( wp_get_update_php_url() )
);
$annotation = wp_get_update_php_annotation();
if ( $annotation ) {
$compat .= ‘
‘ . $annotation . ‘‘;
}
}
// Get the upgrade notice for the new plugin version.
if ( isset( $plugin_data->update->upgrade_notice ) ) {
$upgrade_notice = ‘
‘ . strip_tags( $plugin_data->update->upgrade_notice );
} else {
$upgrade_notice = ”;
}
$details_url = self_admin_url( ‘plugin-install.php?tab=plugin-information&plugin=’ . $plugin_data->update->slug . ‘§ion=changelog&TB_iframe=true&width=640&height=662’ );
$details = sprintf(
‘%3$s’,
esc_url( $details_url ),
/* translators: 1: Plugin name, 2: Version number. */
esc_attr( sprintf( __( ‘View %1$s version %2$s details’ ), $plugin_data->Name, $plugin_data->update->new_version ) ),
/* translators: %s: Plugin version. */
sprintf( __( ‘View version %s details.’ ), $plugin_data->update->new_version )
);
$checkbox_id = ‘checkbox_’ . md5( $plugin_file );
?>
|
Name; ?> Version,
$plugin_data->update->new_version
);
echo ‘ ‘ . $details . $compat . $upgrade_notice;
if ( in_array( $plugin_file, $auto_updates, true ) ) {
echo $auto_update_notice;
}
?>
|