wp_plugin_update_row

The timeline below displays how wordpress function wp_plugin_update_row has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Displays update information for a plugin.
 *
 * @since 2.3.0
 *
 * @param string $file        Plugin basename.
 * @param array  $plugin_data Plugin information.
 * @return void|false
 */
function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $response = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $plugin_slug = isset($response->slug) ? $response->slug : $response->id;
    if (isset($response->slug)) {
        $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&section=changelog');
    } elseif (isset($response->url)) {
        $details_url = $response->url;
    } else {
        $details_url = $plugin_data['PluginURI'];
    }
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 600, 'height' => 800), $details_url);
    /** @var WP_Plugins_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_Plugins_List_Table', array('screen' => get_current_screen()));
    if (is_network_admin() || !is_multisite()) {
        if (is_network_admin()) {
            $active_class = is_plugin_active_for_network($file) ? ' active' : '';
        } else {
            $active_class = is_plugin_active($file) ? ' active' : '';
        }
        $requires_php = isset($response->requires_php) ? $response->requires_php : null;
        $compatible_php = is_php_version_compatible($requires_php);
        $notice_type = $compatible_php ? 'notice-warning' : 'notice-error';
        printf('<tr class="plugin-update-tr%s" id="%s" data-slug="%s" data-plugin="%s">' . '<td colspan="%s" class="plugin-update colspanchange">' . '<div class="update-message notice inline %s notice-alt"><p>', $active_class, esc_attr($plugin_slug . '-update'), esc_attr($plugin_slug), esc_attr($file), esc_attr($wp_list_table->get_column_count()), $notice_type);
        if (!current_user_can('update_plugins')) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version)
            );
        } elseif (empty($response->package)) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version)
            );
        } else if ($compatible_php) {
            printf(
                /* translators: 1: Plugin 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. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version),
                wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file),
                sprintf(
                    'class="update-link" aria-label="%s"',
                    /* translators: %s: Plugin name. */
                    esc_attr(sprintf(_x('Update %s now', 'plugin'), $plugin_name))
                )
            );
        } else {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number 5: URL to Update PHP page. */
                __('There is a new version of %1$s available, but it does not work with your version of PHP. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s">learn more about updating PHP</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version),
                esc_url(wp_get_update_php_url())
            );
            wp_update_php_annotation('<br><em>', '</em>');
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, `$file`, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array  $plugin_data An array of plugin metadata. See get_plugin_data()
         *                            and the {@see 'plugin_row_meta'} filter for the list
         *                            of possible values.
         * @param object $response {
         *     An object of metadata about the available plugin update.
         *
         *     @type string   $id           Plugin ID, e.g. `w.org/plugins/[plugin-name]`.
         *     @type string   $slug         Plugin slug.
         *     @type string   $plugin       Plugin basename.
         *     @type string   $new_version  New plugin version.
         *     @type string   $url          Plugin URL.
         *     @type string   $package      Plugin update package URL.
         *     @type string[] $icons        An array of plugin icon URLs.
         *     @type string[] $banners      An array of plugin banner URLs.
         *     @type string[] $banners_rtl  An array of plugin RTL banner URLs.
         *     @type string   $requires     The version of WordPress which the plugin requires.
         *     @type string   $tested       The version of WordPress the plugin is tested against.
         *     @type string   $requires_php The version of PHP which the plugin requires.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $response);
        // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
        echo '</p></div></td></tr>';
    }
}

WordPress Version: 5.9

/**
 * Displays update information for a plugin.
 *
 * @since 2.3.0
 *
 * @param string $file        Plugin basename.
 * @param array  $plugin_data Plugin information.
 * @return void|false
 */
function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $response = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $plugin_slug = isset($response->slug) ? $response->slug : $response->id;
    if (isset($response->slug)) {
        $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&section=changelog');
    } elseif (isset($response->url)) {
        $details_url = $response->url;
    } else {
        $details_url = $plugin_data['PluginURI'];
    }
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 600, 'height' => 800), $details_url);
    /** @var WP_Plugins_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_Plugins_List_Table', array('screen' => get_current_screen()));
    if (is_network_admin() || !is_multisite()) {
        if (is_network_admin()) {
            $active_class = is_plugin_active_for_network($file) ? ' active' : '';
        } else {
            $active_class = is_plugin_active($file) ? ' active' : '';
        }
        $requires_php = isset($response->requires_php) ? $response->requires_php : null;
        $compatible_php = is_php_version_compatible($requires_php);
        $notice_type = $compatible_php ? 'notice-warning' : 'notice-error';
        printf('<tr class="plugin-update-tr%s" id="%s" data-slug="%s" data-plugin="%s">' . '<td colspan="%s" class="plugin-update colspanchange">' . '<div class="update-message notice inline %s notice-alt"><p>', $active_class, esc_attr($plugin_slug . '-update'), esc_attr($plugin_slug), esc_attr($file), esc_attr($wp_list_table->get_column_count()), $notice_type);
        if (!current_user_can('update_plugins')) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version)
            );
        } elseif (empty($response->package)) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version)
            );
        } else if ($compatible_php) {
            printf(
                /* translators: 1: Plugin 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. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version),
                wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file),
                sprintf(
                    'class="update-link" aria-label="%s"',
                    /* translators: %s: Plugin name. */
                    esc_attr(sprintf(_x('Update %s now', 'plugin'), $plugin_name))
                )
            );
        } else {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number 5: URL to Update PHP page. */
                __('There is a new version of %1$s available, but it doesn&#8217;t work with your version of PHP. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s">learn more about updating PHP</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version),
                esc_url(wp_get_update_php_url())
            );
            wp_update_php_annotation('<br><em>', '</em>');
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, `$file`, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array  $plugin_data An array of plugin metadata. See get_plugin_data()
         *                            and the {@see 'plugin_row_meta'} filter for the list
         *                            of possible values.
         * @param object $response {
         *     An object of metadata about the available plugin update.
         *
         *     @type string   $id           Plugin ID, e.g. `w.org/plugins/[plugin-name]`.
         *     @type string   $slug         Plugin slug.
         *     @type string   $plugin       Plugin basename.
         *     @type string   $new_version  New plugin version.
         *     @type string   $url          Plugin URL.
         *     @type string   $package      Plugin update package URL.
         *     @type string[] $icons        An array of plugin icon URLs.
         *     @type string[] $banners      An array of plugin banner URLs.
         *     @type string[] $banners_rtl  An array of plugin RTL banner URLs.
         *     @type string   $requires     The version of WordPress which the plugin requires.
         *     @type string   $tested       The version of WordPress the plugin is tested against.
         *     @type string   $requires_php The version of PHP which the plugin requires.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $response);
        // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
        echo '</p></div></td></tr>';
    }
}

WordPress Version: 5.8

/**
 * Displays update information for a plugin.
 *
 * @since 2.3.0
 *
 * @param string $file        Plugin basename.
 * @param array  $plugin_data Plugin information.
 * @return void|false
 */
function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $response = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $plugin_slug = isset($response->slug) ? $response->slug : $response->id;
    if (isset($response->slug)) {
        $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . '&section=changelog');
    } elseif (isset($response->url)) {
        $details_url = $response->url;
    } else {
        $details_url = $plugin_data['PluginURI'];
    }
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 600, 'height' => 800), $details_url);
    /** @var WP_Plugins_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_Plugins_List_Table', array('screen' => get_current_screen()));
    if (is_network_admin() || !is_multisite()) {
        if (is_network_admin()) {
            $active_class = is_plugin_active_for_network($file) ? ' active' : '';
        } else {
            $active_class = is_plugin_active($file) ? ' active' : '';
        }
        $requires_php = isset($response->requires_php) ? $response->requires_php : null;
        $compatible_php = is_php_version_compatible($requires_php);
        $notice_type = $compatible_php ? 'notice-warning' : 'notice-error';
        printf('<tr class="plugin-update-tr%s" id="%s" data-slug="%s" data-plugin="%s">' . '<td colspan="%s" class="plugin-update colspanchange">' . '<div class="update-message notice inline %s notice-alt"><p>', $active_class, esc_attr($plugin_slug . '-update'), esc_attr($plugin_slug), esc_attr($file), esc_attr($wp_list_table->get_column_count()), $notice_type);
        if (!current_user_can('update_plugins')) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version)
            );
        } elseif (empty($response->package)) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version)
            );
        } else if ($compatible_php) {
            printf(
                /* translators: 1: Plugin 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. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version),
                wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file),
                sprintf(
                    'class="update-link" aria-label="%s"',
                    /* translators: %s: Plugin name. */
                    esc_attr(sprintf(_x('Update %s now', 'plugin'), $plugin_name))
                )
            );
        } else {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number 5: URL to Update PHP page. */
                __('There is a new version of %1$s available, but it doesn&#8217;t work with your version of PHP. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s">learn more about updating PHP</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version),
                esc_url(wp_get_update_php_url())
            );
            wp_update_php_annotation('<br><em>', '</em>');
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, `$file`, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array $plugin_data {
         *     An array of plugin metadata.
         *
         *     @type string $name        The human-readable name of the plugin.
         *     @type string $plugin_uri  Plugin URI.
         *     @type string $version     Plugin version.
         *     @type string $description Plugin description.
         *     @type string $author      Plugin author.
         *     @type string $author_uri  Plugin author URI.
         *     @type string $text_domain Plugin text domain.
         *     @type string $domain_path Relative path to the plugin's .mo file(s).
         *     @type bool   $network     Whether the plugin can only be activated network wide.
         *     @type string $title       The human-readable title of the plugin.
         *     @type string $author_name Plugin author's name.
         *     @type bool   $update      Whether there's an available update. Default null.
         * }
         * @param array $response {
         *     An array of metadata about the available plugin update.
         *
         *     @type int    $id          Plugin ID.
         *     @type string $slug        Plugin slug.
         *     @type string $new_version New plugin version.
         *     @type string $url         Plugin URL.
         *     @type string $package     Plugin update package URL.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $response);
        // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
        echo '</p></div></td></tr>';
    }
}

WordPress Version: 5.5

/**
 * Displays update information for a plugin.
 *
 * @since 2.3.0
 *
 * @param string $file        Plugin basename.
 * @param array  $plugin_data Plugin information.
 * @return void|false
 */
function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $response = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $response->slug . '&section=changelog&TB_iframe=true&width=600&height=800');
    /** @var WP_Plugins_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_Plugins_List_Table', array('screen' => get_current_screen()));
    if (is_network_admin() || !is_multisite()) {
        if (is_network_admin()) {
            $active_class = is_plugin_active_for_network($file) ? ' active' : '';
        } else {
            $active_class = is_plugin_active($file) ? ' active' : '';
        }
        $requires_php = isset($response->requires_php) ? $response->requires_php : null;
        $compatible_php = is_php_version_compatible($requires_php);
        $notice_type = $compatible_php ? 'notice-warning' : 'notice-error';
        printf('<tr class="plugin-update-tr%s" id="%s" data-slug="%s" data-plugin="%s">' . '<td colspan="%s" class="plugin-update colspanchange">' . '<div class="update-message notice inline %s notice-alt"><p>', $active_class, esc_attr($response->slug . '-update'), esc_attr($response->slug), esc_attr($file), esc_attr($wp_list_table->get_column_count()), $notice_type);
        if (!current_user_can('update_plugins')) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version)
            );
        } elseif (empty($response->package)) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version)
            );
        } else if ($compatible_php) {
            printf(
                /* translators: 1: Plugin 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. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version),
                wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file),
                sprintf(
                    'class="update-link" aria-label="%s"',
                    /* translators: %s: Plugin name. */
                    esc_attr(sprintf(_x('Update %s now', 'plugin'), $plugin_name))
                )
            );
        } else {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number 5: URL to Update PHP page. */
                __('There is a new version of %1$s available, but it doesn&#8217;t work with your version of PHP. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s">learn more about updating PHP</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version),
                esc_url(wp_get_update_php_url())
            );
            wp_update_php_annotation('<br><em>', '</em>');
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, `$file`, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array $plugin_data {
         *     An array of plugin metadata.
         *
         *     @type string $name        The human-readable name of the plugin.
         *     @type string $plugin_uri  Plugin URI.
         *     @type string $version     Plugin version.
         *     @type string $description Plugin description.
         *     @type string $author      Plugin author.
         *     @type string $author_uri  Plugin author URI.
         *     @type string $text_domain Plugin text domain.
         *     @type string $domain_path Relative path to the plugin's .mo file(s).
         *     @type bool   $network     Whether the plugin can only be activated network wide.
         *     @type string $title       The human-readable title of the plugin.
         *     @type string $author_name Plugin author's name.
         *     @type bool   $update      Whether there's an available update. Default null.
         * }
         * @param array $response {
         *     An array of metadata about the available plugin update.
         *
         *     @type int    $id          Plugin ID.
         *     @type string $slug        Plugin slug.
         *     @type string $new_version New plugin version.
         *     @type string $url         Plugin URL.
         *     @type string $package     Plugin update package URL.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $response);
        // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
        echo '</p></div></td></tr>';
    }
}

WordPress Version: 5.4

/**
 * Displays update information for a plugin.
 *
 * @since 2.3.0
 *
 * @param string $file        Plugin basename.
 * @param array  $plugin_data Plugin information.
 * @return void|false
 */
function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $response = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $response->slug . '&section=changelog&TB_iframe=true&width=600&height=800');
    /** @var WP_Plugins_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_Plugins_List_Table');
    if (is_network_admin() || !is_multisite()) {
        if (is_network_admin()) {
            $active_class = is_plugin_active_for_network($file) ? ' active' : '';
        } else {
            $active_class = is_plugin_active($file) ? ' active' : '';
        }
        $requires_php = isset($response->requires_php) ? $response->requires_php : null;
        $compatible_php = is_php_version_compatible($requires_php);
        $notice_type = $compatible_php ? 'notice-warning' : 'notice-error';
        printf('<tr class="plugin-update-tr%s" id="%s" data-slug="%s" data-plugin="%s">' . '<td colspan="%s" class="plugin-update colspanchange">' . '<div class="update-message notice inline %s notice-alt"><p>', $active_class, esc_attr($response->slug . '-update'), esc_attr($response->slug), esc_attr($file), esc_attr($wp_list_table->get_column_count()), $notice_type);
        if (!current_user_can('update_plugins')) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version)
            );
        } elseif (empty($response->package)) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version)
            );
        } else if ($compatible_php) {
            printf(
                /* translators: 1: Plugin 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. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version),
                wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file),
                sprintf(
                    'class="update-link" aria-label="%s"',
                    /* translators: %s: Plugin name. */
                    esc_attr(sprintf(__('Update %s now'), $plugin_name))
                )
            );
        } else {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number 5: URL to Update PHP page. */
                __('There is a new version of %1$s available, but it doesn&#8217;t work with your version of PHP. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s">learn more about updating PHP</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version),
                esc_url(wp_get_update_php_url())
            );
            wp_update_php_annotation('<br><em>', '</em>');
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, `$file`, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array $plugin_data {
         *     An array of plugin metadata.
         *
         *     @type string $name        The human-readable name of the plugin.
         *     @type string $plugin_uri  Plugin URI.
         *     @type string $version     Plugin version.
         *     @type string $description Plugin description.
         *     @type string $author      Plugin author.
         *     @type string $author_uri  Plugin author URI.
         *     @type string $text_domain Plugin text domain.
         *     @type string $domain_path Relative path to the plugin's .mo file(s).
         *     @type bool   $network     Whether the plugin can only be activated network wide.
         *     @type string $title       The human-readable title of the plugin.
         *     @type string $author_name Plugin author's name.
         *     @type bool   $update      Whether there's an available update. Default null.
         * }
         * @param array $response {
         *     An array of metadata about the available plugin update.
         *
         *     @type int    $id          Plugin ID.
         *     @type string $slug        Plugin slug.
         *     @type string $new_version New plugin version.
         *     @type string $url         Plugin URL.
         *     @type string $package     Plugin update package URL.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $response);
        // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
        echo '</p></div></td></tr>';
    }
}

WordPress Version: 5.3

/**
 * Displays update information for a plugin.
 *
 * @param string $file        Plugin basename.
 * @param array  $plugin_data Plugin information.
 * @return false|void
 */
function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $response = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $response->slug . '&section=changelog&TB_iframe=true&width=600&height=800');
    /** @var WP_Plugins_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_Plugins_List_Table');
    if (is_network_admin() || !is_multisite()) {
        if (is_network_admin()) {
            $active_class = is_plugin_active_for_network($file) ? ' active' : '';
        } else {
            $active_class = is_plugin_active($file) ? ' active' : '';
        }
        $requires_php = isset($response->requires_php) ? $response->requires_php : null;
        $compatible_php = is_php_version_compatible($requires_php);
        $notice_type = $compatible_php ? 'notice-warning' : 'notice-error';
        printf('<tr class="plugin-update-tr%s" id="%s" data-slug="%s" data-plugin="%s">' . '<td colspan="%s" class="plugin-update colspanchange">' . '<div class="update-message notice inline %s notice-alt"><p>', $active_class, esc_attr($response->slug . '-update'), esc_attr($response->slug), esc_attr($file), esc_attr($wp_list_table->get_column_count()), $notice_type);
        if (!current_user_can('update_plugins')) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version)
            );
        } elseif (empty($response->package)) {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number. */
                __('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version)
            );
        } else if ($compatible_php) {
            printf(
                /* translators: 1: Plugin 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. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version),
                wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file),
                sprintf(
                    'class="update-link" aria-label="%s"',
                    /* translators: %s: Plugin name. */
                    esc_attr(sprintf(__('Update %s now'), $plugin_name))
                )
            );
        } else {
            printf(
                /* translators: 1: Plugin name, 2: Details URL, 3: Additional link attributes, 4: Version number 5: URL to Update PHP page. */
                __('There is a new version of %1$s available, but it doesn&#8217;t work with your version of PHP. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s">learn more about updating PHP</a>.'),
                $plugin_name,
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Plugin name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
                ),
                esc_attr($response->new_version),
                esc_url(wp_get_update_php_url())
            );
            wp_update_php_annotation('<br><em>', '</em>');
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, `$file`, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array $plugin_data {
         *     An array of plugin metadata.
         *
         *     @type string $name        The human-readable name of the plugin.
         *     @type string $plugin_uri  Plugin URI.
         *     @type string $version     Plugin version.
         *     @type string $description Plugin description.
         *     @type string $author      Plugin author.
         *     @type string $author_uri  Plugin author URI.
         *     @type string $text_domain Plugin text domain.
         *     @type string $domain_path Relative path to the plugin's .mo file(s).
         *     @type bool   $network     Whether the plugin can only be activated network wide.
         *     @type string $title       The human-readable title of the plugin.
         *     @type string $author_name Plugin author's name.
         *     @type bool   $update      Whether there's an available update. Default null.
         * }
         * @param array $response {
         *     An array of metadata about the available plugin update.
         *
         *     @type int    $id          Plugin ID.
         *     @type string $slug        Plugin slug.
         *     @type string $new_version New plugin version.
         *     @type string $url         Plugin URL.
         *     @type string $package     Plugin update package URL.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $response);
        // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
        echo '</p></div></td></tr>';
    }
}

WordPress Version: 5.2

/**
 * Displays update information for a plugin.
 *
 * @param string $file        Plugin basename.
 * @param array  $plugin_data Plugin information.
 * @return false|void
 */
function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $response = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $response->slug . '&section=changelog&TB_iframe=true&width=600&height=800');
    /** @var WP_Plugins_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_Plugins_List_Table');
    if (is_network_admin() || !is_multisite()) {
        if (is_network_admin()) {
            $active_class = is_plugin_active_for_network($file) ? ' active' : '';
        } else {
            $active_class = is_plugin_active($file) ? ' active' : '';
        }
        $requires_php = isset($response->requires_php) ? $response->requires_php : null;
        $compatible_php = is_php_version_compatible($requires_php);
        $notice_type = $compatible_php ? 'notice-warning' : 'notice-error';
        echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr($response->slug . '-update') . '" data-slug="' . esc_attr($response->slug) . '" data-plugin="' . esc_attr($file) . '"><td colspan="' . esc_attr($wp_list_table->get_column_count()) . '" class="plugin-update colspanchange"><div class="update-message notice inline ' . $notice_type . ' notice-alt"><p>';
        if (!current_user_can('update_plugins')) {
            /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */
            printf(__('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.'), $plugin_name, esc_url($details_url), sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: plugin name, 2: version number */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
            ), esc_attr($response->new_version));
        } elseif (empty($response->package)) {
            /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */
            printf(__('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: plugin name, 2: version number */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
            ), esc_attr($response->new_version));
        } else if ($compatible_php) {
            /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
            printf(__('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.'), $plugin_name, esc_url($details_url), sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: plugin name, 2: version number */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
            ), esc_attr($response->new_version), wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file), sprintf(
                'class="update-link" aria-label="%s"',
                /* translators: %s: plugin name */
                esc_attr(sprintf(__('Update %s now'), $plugin_name))
            ));
        } else {
            /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number 5: Update PHP page URL */
            printf(__('There is a new version of %1$s available, but it doesn&#8217;t work with your version of PHP. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s">learn more about updating PHP</a>.'), $plugin_name, esc_url($details_url), sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: plugin name, 2: version number */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
            ), esc_attr($response->new_version), esc_url(wp_get_update_php_url()));
            wp_update_php_annotation('<br><em>', '</em>');
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, `$file`, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array $plugin_data {
         *     An array of plugin metadata.
         *
         *     @type string $name        The human-readable name of the plugin.
         *     @type string $plugin_uri  Plugin URI.
         *     @type string $version     Plugin version.
         *     @type string $description Plugin description.
         *     @type string $author      Plugin author.
         *     @type string $author_uri  Plugin author URI.
         *     @type string $text_domain Plugin text domain.
         *     @type string $domain_path Relative path to the plugin's .mo file(s).
         *     @type bool   $network     Whether the plugin can only be activated network wide.
         *     @type string $title       The human-readable title of the plugin.
         *     @type string $author_name Plugin author's name.
         *     @type bool   $update      Whether there's an available update. Default null.
         * }
         * @param array $response {
         *     An array of metadata about the available plugin update.
         *
         *     @type int    $id          Plugin ID.
         *     @type string $slug        Plugin slug.
         *     @type string $new_version New plugin version.
         *     @type string $url         Plugin URL.
         *     @type string $package     Plugin update package URL.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $response);
        echo '</p></div></td></tr>';
    }
}

WordPress Version: 4.6

/**
 * Displays update information for a plugin.
 *
 * @param string $file        Plugin basename.
 * @param array  $plugin_data Plugin information.
 * @return false|void
 */
function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $response = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $response->slug . '&section=changelog&TB_iframe=true&width=600&height=800');
    /** @var WP_Plugins_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_Plugins_List_Table');
    if (is_network_admin() || !is_multisite()) {
        if (is_network_admin()) {
            $active_class = is_plugin_active_for_network($file) ? ' active' : '';
        } else {
            $active_class = is_plugin_active($file) ? ' active' : '';
        }
        echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr($response->slug . '-update') . '" data-slug="' . esc_attr($response->slug) . '" data-plugin="' . esc_attr($file) . '"><td colspan="' . esc_attr($wp_list_table->get_column_count()) . '" class="plugin-update colspanchange"><div class="update-message notice inline notice-warning notice-alt"><p>';
        if (!current_user_can('update_plugins')) {
            /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */
            printf(__('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>.'), $plugin_name, esc_url($details_url), sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: plugin name, 2: version number */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
            ), $response->new_version);
        } elseif (empty($response->package)) {
            /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number */
            printf(__('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: plugin name, 2: version number */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
            ), $response->new_version);
        } else {
            /* translators: 1: plugin name, 2: details URL, 3: additional link attributes, 4: version number, 5: update URL, 6: additional link attributes */
            printf(__('There is a new version of %1$s available. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.'), $plugin_name, esc_url($details_url), sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: plugin name, 2: version number */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $response->new_version))
            ), $response->new_version, wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file), sprintf(
                'class="update-link" aria-label="%s"',
                /* translators: %s: plugin name */
                esc_attr(sprintf(__('Update %s now'), $plugin_name))
            ));
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, `$file`, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array $plugin_data {
         *     An array of plugin metadata.
         *
         *     @type string $name        The human-readable name of the plugin.
         *     @type string $plugin_uri  Plugin URI.
         *     @type string $version     Plugin version.
         *     @type string $description Plugin description.
         *     @type string $author      Plugin author.
         *     @type string $author_uri  Plugin author URI.
         *     @type string $text_domain Plugin text domain.
         *     @type string $domain_path Relative path to the plugin's .mo file(s).
         *     @type bool   $network     Whether the plugin can only be activated network wide.
         *     @type string $title       The human-readable title of the plugin.
         *     @type string $author_name Plugin author's name.
         *     @type bool   $update      Whether there's an available update. Default null.
         * }
         * @param array $response {
         *     An array of metadata about the available plugin update.
         *
         *     @type int    $id          Plugin ID.
         *     @type string $slug        Plugin slug.
         *     @type string $new_version New plugin version.
         *     @type string $url         Plugin URL.
         *     @type string $package     Plugin update package URL.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $response);
        echo '</p></div></td></tr>';
    }
}

WordPress Version: 4.5

/**
 *
 * @param string $file
 * @param array  $plugin_data
 * @return false|void
 */
function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $r = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&section=changelog&TB_iframe=true&width=600&height=800');
    $wp_list_table = _get_list_table('WP_Plugins_List_Table');
    if (is_network_admin() || !is_multisite()) {
        if (is_network_admin()) {
            $active_class = is_plugin_active_for_network($file) ? ' active' : '';
        } else {
            $active_class = is_plugin_active($file) ? ' active' : '';
        }
        echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr($r->slug . '-update') . '" data-slug="' . esc_attr($r->slug) . '" data-plugin="' . esc_attr($file) . '"><td colspan="' . esc_attr($wp_list_table->get_column_count()) . '" class="plugin-update colspanchange"><div class="update-message">';
        if (!current_user_can('update_plugins')) {
            /* translators: 1: plugin name, 2: details URL, 3: accessibility text, 4: version number */
            printf(
                __('There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>.'),
                $plugin_name,
                esc_url($details_url),
                /* translators: 1: plugin name, 2: version number */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $r->new_version)),
                $r->new_version
            );
        } elseif (empty($r->package)) {
            /* translators: 1: plugin name, 2: details URL, 3: accessibility text, 4: version number */
            printf(
                __('There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'),
                $plugin_name,
                esc_url($details_url),
                /* translators: 1: plugin name, 2: version number */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $r->new_version)),
                $r->new_version
            );
        } else {
            /* translators: 1: plugin name, 2: details URL, 3: accessibility text, 4: version number, 5: update URL, 6: accessibility text */
            printf(
                __('There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="%6$s">update now</a>.'),
                $plugin_name,
                esc_url($details_url),
                /* translators: 1: plugin name, 2: version number */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $plugin_name, $r->new_version)),
                $r->new_version,
                wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file),
                /* translators: %s: plugin name */
                esc_attr(sprintf(__('Update %s now'), $plugin_name))
            );
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, `$file`, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array $plugin_data {
         *     An array of plugin metadata.
         *
         *     @type string $name         The human-readable name of the plugin.
         *     @type string $plugin_uri   Plugin URI.
         *     @type string $version      Plugin version.
         *     @type string $description  Plugin description.
         *     @type string $author       Plugin author.
         *     @type string $author_uri   Plugin author URI.
         *     @type string $text_domain  Plugin text domain.
         *     @type string $domain_path  Relative path to the plugin's .mo file(s).
         *     @type bool   $network      Whether the plugin can only be activated network wide.
         *     @type string $title        The human-readable title of the plugin.
         *     @type string $author_name  Plugin author's name.
         *     @type bool   $update       Whether there's an available update. Default null.
         * }
         * @param array $r {
         *     An array of metadata about the available plugin update.
         *
         *     @type int    $id           Plugin ID.
         *     @type string $slug         Plugin slug.
         *     @type string $new_version  New plugin version.
         *     @type string $url          Plugin URL.
         *     @type string $package      Plugin update package URL.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $r);
        echo '</div></td></tr>';
    }
}

WordPress Version: 4.3

/**
 *
 * @param string $file
 * @param array  $plugin_data
 * @return false|void
 */
function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $r = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&section=changelog&TB_iframe=true&width=600&height=800');
    $wp_list_table = _get_list_table('WP_Plugins_List_Table');
    if (is_network_admin() || !is_multisite()) {
        if (is_network_admin()) {
            $active_class = is_plugin_active_for_network($file) ? ' active' : '';
        } else {
            $active_class = is_plugin_active($file) ? ' active' : '';
        }
        echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr($r->slug . '-update') . '" data-slug="' . esc_attr($r->slug) . '" data-plugin="' . esc_attr($file) . '"><td colspan="' . esc_attr($wp_list_table->get_column_count()) . '" class="plugin-update colspanchange"><div class="update-message">';
        if (!current_user_can('update_plugins')) {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version);
        } elseif (empty($r->package)) {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version);
        } else {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link">update now</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file));
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, `$file`, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array $plugin_data {
         *     An array of plugin metadata.
         *
         *     @type string $name         The human-readable name of the plugin.
         *     @type string $plugin_uri   Plugin URI.
         *     @type string $version      Plugin version.
         *     @type string $description  Plugin description.
         *     @type string $author       Plugin author.
         *     @type string $author_uri   Plugin author URI.
         *     @type string $text_domain  Plugin text domain.
         *     @type string $domain_path  Relative path to the plugin's .mo file(s).
         *     @type bool   $network      Whether the plugin can only be activated network wide.
         *     @type string $title        The human-readable title of the plugin.
         *     @type string $author_name  Plugin author's name.
         *     @type bool   $update       Whether there's an available update. Default null.
         * }
         * @param array $r {
         *     An array of metadata about the available plugin update.
         *
         *     @type int    $id           Plugin ID.
         *     @type string $slug         Plugin slug.
         *     @type string $new_version  New plugin version.
         *     @type string $url          Plugin URL.
         *     @type string $package      Plugin update package URL.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $r);
        echo '</div></td></tr>';
    }
}

WordPress Version: 4.2

function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $r = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&section=changelog&TB_iframe=true&width=600&height=800');
    $wp_list_table = _get_list_table('WP_Plugins_List_Table');
    if (is_network_admin() || !is_multisite()) {
        $active_class = is_plugin_active($plugin_data['plugin']) ? ' active' : '';
        echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr($r->slug . '-update') . '" data-slug="' . esc_attr($r->slug) . '" data-plugin="' . esc_attr($file) . '"><td colspan="' . esc_attr($wp_list_table->get_column_count()) . '" class="plugin-update colspanchange"><div class="update-message">';
        if (!current_user_can('update_plugins')) {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version);
        } elseif (empty($r->package)) {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version);
        } else {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link">update now</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file));
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, `$file`, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array $plugin_data {
         *     An array of plugin metadata.
         *
         *     @type string $name         The human-readable name of the plugin.
         *     @type string $plugin_uri   Plugin URI.
         *     @type string $version      Plugin version.
         *     @type string $description  Plugin description.
         *     @type string $author       Plugin author.
         *     @type string $author_uri   Plugin author URI.
         *     @type string $text_domain  Plugin text domain.
         *     @type string $domain_path  Relative path to the plugin's .mo file(s).
         *     @type bool   $network      Whether the plugin can only be activated network wide.
         *     @type string $title        The human-readable title of the plugin.
         *     @type string $author_name  Plugin author's name.
         *     @type bool   $update       Whether there's an available update. Default null.
         * }
         * @param array $r {
         *     An array of metadata about the available plugin update.
         *
         *     @type int    $id           Plugin ID.
         *     @type string $slug         Plugin slug.
         *     @type string $new_version  New plugin version.
         *     @type string $url          Plugin URL.
         *     @type string $package      Plugin update package URL.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $r);
        echo '</div></td></tr>';
    }
}

WordPress Version: 4.1

function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $r = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&section=changelog&TB_iframe=true&width=600&height=800');
    $wp_list_table = _get_list_table('WP_Plugins_List_Table');
    if (is_network_admin() || !is_multisite()) {
        echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
        if (!current_user_can('update_plugins')) {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version);
        } else if (empty($r->package)) {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version);
        } else {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file));
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, `$file`, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array $plugin_data {
         *     An array of plugin metadata.
         *
         *     @type string $name         The human-readable name of the plugin.
         *     @type string $plugin_uri   Plugin URI.
         *     @type string $version      Plugin version.
         *     @type string $description  Plugin description.
         *     @type string $author       Plugin author.
         *     @type string $author_uri   Plugin author URI.
         *     @type string $text_domain  Plugin text domain.
         *     @type string $domain_path  Relative path to the plugin's .mo file(s).
         *     @type bool   $network      Whether the plugin can only be activated network wide.
         *     @type string $title        The human-readable title of the plugin.
         *     @type string $author_name  Plugin author's name.
         *     @type bool   $update       Whether there's an available update. Default null.
         * }
         * @param array $r {
         *     An array of metadata about the available plugin update.
         *
         *     @type int    $id           Plugin ID.
         *     @type string $slug         Plugin slug.
         *     @type string $new_version  New plugin version.
         *     @type string $url          Plugin URL.
         *     @type string $package      Plugin update package URL.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $r);
        echo '</div></td></tr>';
    }
}

WordPress Version: 3.8

function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $r = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&section=changelog&TB_iframe=true&width=600&height=800');
    $wp_list_table = _get_list_table('WP_Plugins_List_Table');
    if (is_network_admin() || !is_multisite()) {
        echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
        if (!current_user_can('update_plugins')) {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version);
        } else if (empty($r->package)) {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version);
        } else {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file));
        }
        /**
         * Fires at the end of the update message container in each
         * row of the plugins list table.
         *
         * The dynamic portion of the hook name, $file, refers to the path
         * of the plugin's primary file relative to the plugins directory.
         *
         * @since 2.8.0
         *
         * @param array $plugin_data {
         *     An array of plugin metadata.
         *
         *     @type string $name         The human-readable name of the plugin.
         *     @type string $plugin_uri   Plugin URI.
         *     @type string $version      Plugin version.
         *     @type string $description  Plugin description.
         *     @type string $author       Plugin author.
         *     @type string $author_uri   Plugin author URI.
         *     @type string $text_domain  Plugin text domain.
         *     @type string $domain_path  Relative path to the plugin's .mo file(s).
         *     @type bool   $network      Whether the plugin can only be activated network wide.
         *     @type string $title        The human-readable title of the plugin.
         *     @type string $author_name  Plugin author's name.
         *     @type bool   $update       Whether there's an available update. Default null.
         * }
         * @param array $r {
         *     An array of metadata about the available plugin update.
         *
         *     @type int    $id           Plugin ID.
         *     @type string $slug         Plugin slug.
         *     @type string $new_version  New plugin version.
         *     @type string $url          Plugin URL.
         *     @type string $package      Plugin update package URL.
         * }
         */
        do_action("in_plugin_update_message-{$file}", $plugin_data, $r);
        echo '</div></td></tr>';
    }
}

WordPress Version: 3.7

function wp_plugin_update_row($file, $plugin_data)
{
    $current = get_site_transient('update_plugins');
    if (!isset($current->response[$file])) {
        return false;
    }
    $r = $current->response[$file];
    $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $plugin_name = wp_kses($plugin_data['Name'], $plugins_allowedtags);
    $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $r->slug . '&section=changelog&TB_iframe=true&width=600&height=800');
    $wp_list_table = _get_list_table('WP_Plugins_List_Table');
    if (is_network_admin() || !is_multisite()) {
        echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
        if (!current_user_can('update_plugins')) {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version);
        } else if (empty($r->package)) {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version);
        } else {
            printf(__('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file));
        }
        do_action("in_plugin_update_message-{$file}", $plugin_data, $r);
        echo '</div></td></tr>';
    }
}