wp_theme_update_row

The timeline below displays how wordpress function wp_theme_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 theme.
 *
 * @since 3.1.0
 *
 * @param string   $theme_key Theme stylesheet.
 * @param WP_Theme $theme     Theme object.
 * @return void|false
 */
function wp_theme_update_row($theme_key, $theme)
{
    $current = get_site_transient('update_themes');
    if (!isset($current->response[$theme_key])) {
        return false;
    }
    $response = $current->response[$theme_key];
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $current->response[$theme_key]['url']);
    /** @var WP_MS_Themes_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    $active = $theme->is_allowed('network') ? ' active' : '';
    $requires_wp = isset($response['requires']) ? $response['requires'] : null;
    $requires_php = isset($response['requires_php']) ? $response['requires_php'] : null;
    $compatible_wp = is_wp_version_compatible($requires_wp);
    $compatible_php = is_php_version_compatible($requires_php);
    printf('<tr class="plugin-update-tr%s" id="%s" data-slug="%s">' . '<td colspan="%s" class="plugin-update colspanchange">' . '<div class="update-message notice inline notice-warning notice-alt"><p>', $active, esc_attr($theme->get_stylesheet() . '-update'), esc_attr($theme->get_stylesheet()), $wp_list_table->get_column_count());
    if ($compatible_wp && $compatible_php) {
        if (!current_user_can('update_themes')) {
            printf(
                /* translators: 1: Theme 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>.'),
                $theme['Name'],
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Theme name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
                ),
                $response['new_version']
            );
        } elseif (empty($response['package'])) {
            printf(
                /* translators: 1: Theme 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 theme.</em>'),
                $theme['Name'],
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Theme name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
                ),
                $response['new_version']
            );
        } else {
            printf(
                /* 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. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.'),
                $theme['Name'],
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Theme name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
                ),
                $response['new_version'],
                wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key),
                sprintf(
                    'class="update-link" aria-label="%s"',
                    /* translators: %s: Theme name. */
                    esc_attr(sprintf(_x('Update %s now', 'theme'), $theme['Name']))
                )
            );
        }
    } else if (!$compatible_wp && !$compatible_php) {
        printf(
            /* 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(
                /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
                ' ' . __('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
                self_admin_url('update-core.php'),
                esc_url(wp_get_update_php_url())
            );
            wp_update_php_annotation('</p><p><em>', '</em>');
        } elseif (current_user_can('update_core')) {
            printf(
                /* translators: %s: URL to WordPress Updates screen. */
                ' ' . __('<a href="%s">Please update WordPress</a>.'),
                self_admin_url('update-core.php')
            );
        } elseif (current_user_can('update_php')) {
            printf(
                /* translators: %s: URL to Update PHP page. */
                ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
                esc_url(wp_get_update_php_url())
            );
            wp_update_php_annotation('</p><p><em>', '</em>');
        }
    } elseif (!$compatible_wp) {
        printf(
            /* 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(
                /* translators: %s: URL to WordPress Updates screen. */
                ' ' . __('<a href="%s">Please update WordPress</a>.'),
                self_admin_url('update-core.php')
            );
        }
    } elseif (!$compatible_php) {
        printf(
            /* 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(
                /* translators: %s: URL to Update PHP page. */
                ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
                esc_url(wp_get_update_php_url())
            );
            wp_update_php_annotation('</p><p><em>', '</em>');
        }
    }
    /**
     * 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 '</p></div></td></tr>';
}

WordPress Version: 5.5

/**
 * Displays update information for a theme.
 *
 * @since 3.1.0
 *
 * @param string   $theme_key Theme stylesheet.
 * @param WP_Theme $theme     Theme object.
 * @return void|false
 */
function wp_theme_update_row($theme_key, $theme)
{
    $current = get_site_transient('update_themes');
    if (!isset($current->response[$theme_key])) {
        return false;
    }
    $response = $current->response[$theme_key];
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $current->response[$theme_key]['url']);
    /** @var WP_MS_Themes_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    $active = $theme->is_allowed('network') ? ' active' : '';
    $requires_wp = isset($response['requires']) ? $response['requires'] : null;
    $requires_php = isset($response['requires_php']) ? $response['requires_php'] : null;
    $compatible_wp = is_wp_version_compatible($requires_wp);
    $compatible_php = is_php_version_compatible($requires_php);
    printf('<tr class="plugin-update-tr%s" id="%s" data-slug="%s">' . '<td colspan="%s" class="plugin-update colspanchange">' . '<div class="update-message notice inline notice-warning notice-alt"><p>', $active, esc_attr($theme->get_stylesheet() . '-update'), esc_attr($theme->get_stylesheet()), $wp_list_table->get_column_count());
    if ($compatible_wp && $compatible_php) {
        if (!current_user_can('update_themes')) {
            printf(
                /* translators: 1: Theme 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>.'),
                $theme['Name'],
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Theme name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
                ),
                $response['new_version']
            );
        } elseif (empty($response['package'])) {
            printf(
                /* translators: 1: Theme 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 theme.</em>'),
                $theme['Name'],
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Theme name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
                ),
                $response['new_version']
            );
        } else {
            printf(
                /* 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. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.'),
                $theme['Name'],
                esc_url($details_url),
                sprintf(
                    'class="thickbox open-plugin-details-modal" aria-label="%s"',
                    /* translators: 1: Theme name, 2: Version number. */
                    esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
                ),
                $response['new_version'],
                wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key),
                sprintf(
                    'class="update-link" aria-label="%s"',
                    /* translators: %s: Theme name. */
                    esc_attr(sprintf(_x('Update %s now', 'theme'), $theme['Name']))
                )
            );
        }
    } else if (!$compatible_wp && !$compatible_php) {
        printf(
            /* translators: %s: Theme name. */
            __('There is a new version of %s available, but it doesn&#8217;t work with your versions of WordPress and PHP.'),
            $theme['Name']
        );
        if (current_user_can('update_core') && current_user_can('update_php')) {
            printf(
                /* translators: 1: URL to WordPress Updates screen, 2: URL to Update PHP page. */
                ' ' . __('<a href="%1$s">Please update WordPress</a>, and then <a href="%2$s">learn more about updating PHP</a>.'),
                self_admin_url('update-core.php'),
                esc_url(wp_get_update_php_url())
            );
            wp_update_php_annotation('</p><p><em>', '</em>');
        } elseif (current_user_can('update_core')) {
            printf(
                /* translators: %s: URL to WordPress Updates screen. */
                ' ' . __('<a href="%s">Please update WordPress</a>.'),
                self_admin_url('update-core.php')
            );
        } elseif (current_user_can('update_php')) {
            printf(
                /* translators: %s: URL to Update PHP page. */
                ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
                esc_url(wp_get_update_php_url())
            );
            wp_update_php_annotation('</p><p><em>', '</em>');
        }
    } elseif (!$compatible_wp) {
        printf(
            /* translators: %s: Theme name. */
            __('There is a new version of %s available, but it doesn&#8217;t work with your version of WordPress.'),
            $theme['Name']
        );
        if (current_user_can('update_core')) {
            printf(
                /* translators: %s: URL to WordPress Updates screen. */
                ' ' . __('<a href="%s">Please update WordPress</a>.'),
                self_admin_url('update-core.php')
            );
        }
    } elseif (!$compatible_php) {
        printf(
            /* translators: %s: Theme name. */
            __('There is a new version of %s available, but it doesn&#8217;t work with your version of PHP.'),
            $theme['Name']
        );
        if (current_user_can('update_php')) {
            printf(
                /* translators: %s: URL to Update PHP page. */
                ' ' . __('<a href="%s">Learn more about updating PHP</a>.'),
                esc_url(wp_get_update_php_url())
            );
            wp_update_php_annotation('</p><p><em>', '</em>');
        }
    }
    /**
     * 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 '</p></div></td></tr>';
}

WordPress Version: 5.4

/**
 * Displays update information for a theme.
 *
 * @since 3.1.0
 *
 * @param string   $theme_key Theme stylesheet.
 * @param WP_Theme $theme     Theme object.
 * @return void|false
 */
function wp_theme_update_row($theme_key, $theme)
{
    $current = get_site_transient('update_themes');
    if (!isset($current->response[$theme_key])) {
        return false;
    }
    $response = $current->response[$theme_key];
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $current->response[$theme_key]['url']);
    /** @var WP_MS_Themes_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    $active = $theme->is_allowed('network') ? ' active' : '';
    printf('<tr class="plugin-update-tr%s" id="%s" data-slug="%s">' . '<td colspan="%s" class="plugin-update colspanchange">' . '<div class="update-message notice inline notice-warning notice-alt"><p>', $active, esc_attr($theme->get_stylesheet() . '-update'), esc_attr($theme->get_stylesheet()), $wp_list_table->get_column_count());
    if (!current_user_can('update_themes')) {
        printf(
            /* translators: 1: Theme 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>.'),
            $theme['Name'],
            esc_url($details_url),
            sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: Theme name, 2: Version number. */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
            ),
            $response['new_version']
        );
    } elseif (empty($response['package'])) {
        printf(
            /* translators: 1: Theme 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 theme.</em>'),
            $theme['Name'],
            esc_url($details_url),
            sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: Theme name, 2: Version number. */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
            ),
            $response['new_version']
        );
    } else {
        printf(
            /* 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. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.'),
            $theme['Name'],
            esc_url($details_url),
            sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: Theme name, 2: Version number. */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
            ),
            $response['new_version'],
            wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key),
            sprintf(
                'class="update-link" aria-label="%s"',
                /* translators: %s: Theme name. */
                esc_attr(sprintf(__('Update %s now'), $theme['Name']))
            )
        );
    }
    /**
     * 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 '</p></div></td></tr>';
}

WordPress Version: 5.3

/**
 * Displays update information for a theme.
 *
 * @param string   $theme_key Theme stylesheet.
 * @param WP_Theme $theme     Theme object.
 * @return false|void
 */
function wp_theme_update_row($theme_key, $theme)
{
    $current = get_site_transient('update_themes');
    if (!isset($current->response[$theme_key])) {
        return false;
    }
    $response = $current->response[$theme_key];
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $current->response[$theme_key]['url']);
    /** @var WP_MS_Themes_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    $active = $theme->is_allowed('network') ? ' active' : '';
    printf('<tr class="plugin-update-tr%s" id="%s" data-slug="%s">' . '<td colspan="%s" class="plugin-update colspanchange">' . '<div class="update-message notice inline notice-warning notice-alt"><p>', $active, esc_attr($theme->get_stylesheet() . '-update'), esc_attr($theme->get_stylesheet()), $wp_list_table->get_column_count());
    if (!current_user_can('update_themes')) {
        printf(
            /* translators: 1: Theme 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>.'),
            $theme['Name'],
            esc_url($details_url),
            sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: Theme name, 2: Version number. */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
            ),
            $response['new_version']
        );
    } elseif (empty($response['package'])) {
        printf(
            /* translators: 1: Theme 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 theme.</em>'),
            $theme['Name'],
            esc_url($details_url),
            sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: Theme name, 2: Version number. */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
            ),
            $response['new_version']
        );
    } else {
        printf(
            /* 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. <a href="%2$s" %3$s>View version %4$s details</a> or <a href="%5$s" %6$s>update now</a>.'),
            $theme['Name'],
            esc_url($details_url),
            sprintf(
                'class="thickbox open-plugin-details-modal" aria-label="%s"',
                /* translators: 1: Theme name, 2: Version number. */
                esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
            ),
            $response['new_version'],
            wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key),
            sprintf(
                'class="update-link" aria-label="%s"',
                /* translators: %s: Theme name. */
                esc_attr(sprintf(__('Update %s now'), $theme['Name']))
            )
        );
    }
    /**
     * 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 '</p></div></td></tr>';
}

WordPress Version: 4.6

/**
 * Displays update information for a theme.
 *
 * @param string   $theme_key Theme stylesheet.
 * @param WP_Theme $theme     Theme object.
 * @return false|void
 */
function wp_theme_update_row($theme_key, $theme)
{
    $current = get_site_transient('update_themes');
    if (!isset($current->response[$theme_key])) {
        return false;
    }
    $response = $current->response[$theme_key];
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $current->response[$theme_key]['url']);
    /** @var WP_MS_Themes_List_Table $wp_list_table */
    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    $active = $theme->is_allowed('network') ? ' active' : '';
    echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr($theme->get_stylesheet() . '-update') . '" data-slug="' . esc_attr($theme->get_stylesheet()) . '"><td colspan="' . $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_themes')) {
        /* translators: 1: theme 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>.'), $theme['Name'], esc_url($details_url), sprintf(
            'class="thickbox open-plugin-details-modal" aria-label="%s"',
            /* translators: 1: theme name, 2: version number */
            esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
        ), $response['new_version']);
    } elseif (empty($response['package'])) {
        /* translators: 1: theme 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 theme.</em>'), $theme['Name'], esc_url($details_url), sprintf(
            'class="thickbox open-plugin-details-modal" aria-label="%s"',
            /* translators: 1: theme name, 2: version number */
            esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
        ), $response['new_version']);
    } else {
        /* translators: 1: theme 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>.'), $theme['Name'], esc_url($details_url), sprintf(
            'class="thickbox open-plugin-details-modal" aria-label="%s"',
            /* translators: 1: theme name, 2: version number */
            esc_attr(sprintf(__('View %1$s version %2$s details'), $theme['Name'], $response['new_version']))
        ), $response['new_version'], wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key), sprintf(
            'class="update-link" aria-label="%s"',
            /* translators: %s: theme name */
            esc_attr(sprintf(__('Update %s now'), $theme['Name']))
        ));
    }
    /**
     * 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);
    echo '</p></div></td></tr>';
}

WordPress Version: 4.5

/**
 *
 * @param string   $theme_key
 * @param WP_Theme $theme
 * @return false|void
 */
function wp_theme_update_row($theme_key, $theme)
{
    $current = get_site_transient('update_themes');
    if (!isset($current->response[$theme_key])) {
        return false;
    }
    $r = $current->response[$theme_key];
    $theme_name = $theme['Name'];
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $current->response[$theme_key]['url']);
    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    $active = $theme->is_allowed('network') ? ' active' : '';
    echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr($theme->get_stylesheet() . '-update') . '" data-slug="' . esc_attr($theme->get_stylesheet()) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
    if (!current_user_can('update_themes')) {
        /* translators: 1: theme 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>.'),
            $theme_name,
            esc_url($details_url),
            /* translators: 1: theme name, 2: version number */
            esc_attr(sprintf(__('View %1$s version %2$s details'), $theme_name, $r['new_version'])),
            $r['new_version']
        );
    } elseif (empty($r['package'])) {
        /* translators: 1: theme 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 theme.</em>'),
            $theme_name,
            esc_url($details_url),
            /* translators: 1: theme name, 2: version number */
            esc_attr(sprintf(__('View %1$s version %2$s details'), $theme_name, $r['new_version'])),
            $r['new_version']
        );
    } else {
        /* translators: 1: theme 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>.'),
            $theme_name,
            esc_url($details_url),
            /* translators: 1: theme name, 2: version number */
            esc_attr(sprintf(__('View %1$s version %2$s details'), $theme_name, $r['new_version'])),
            $r['new_version'],
            wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key),
            /* translators: %s: theme name */
            esc_attr(sprintf(__('Update %s now'), $theme_name))
        );
    }
    /**
     * 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    $r {
     *     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, $r);
    echo '</div></td></tr>';
}

WordPress Version: 4.3

/**
 *
 * @param string   $theme_key
 * @param WP_Theme $theme
 * @return false|void
 */
function wp_theme_update_row($theme_key, $theme)
{
    $current = get_site_transient('update_themes');
    if (!isset($current->response[$theme_key])) {
        return false;
    }
    $r = $current->response[$theme_key];
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $current->response[$theme_key]['url']);
    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    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_themes')) {
        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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['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 theme.</em>'), $theme['Name'], esc_url($details_url), esc_attr($theme['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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key));
    }
    /**
     * 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    $r {
     *     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, $r);
    echo '</div></td></tr>';
}

WordPress Version: 4.2

function wp_theme_update_row($theme_key, $theme)
{
    $current = get_site_transient('update_themes');
    if (!isset($current->response[$theme_key])) {
        return false;
    }
    $r = $current->response[$theme_key];
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $current->response[$theme_key]['url']);
    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    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_themes')) {
        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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['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 theme.</em>'), $theme['Name'], esc_url($details_url), esc_attr($theme['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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key));
    }
    /**
     * 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    $r {
     *     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, $r);
    echo '</div></td></tr>';
}

WordPress Version: 4.1

function wp_theme_update_row($theme_key, $theme)
{
    $current = get_site_transient('update_themes');
    if (!isset($current->response[$theme_key])) {
        return false;
    }
    $r = $current->response[$theme_key];
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $current->response[$theme_key]['url']);
    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    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_themes')) {
        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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['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 theme.</em>'), $theme['Name'], esc_url($details_url), esc_attr($theme['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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key));
    }
    /**
     * 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    $r {
     *     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, $r);
    echo '</div></td></tr>';
}

WordPress Version: 4.0

function wp_theme_update_row($theme_key, $theme)
{
    $current = get_site_transient('update_themes');
    if (!isset($current->response[$theme_key])) {
        return false;
    }
    $r = $current->response[$theme_key];
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $current->response[$theme_key]['url']);
    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    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_themes')) {
        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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['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 theme.</em>'), $theme['Name'], esc_url($details_url), esc_attr($theme['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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key));
    }
    /**
     * 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    $r {
     *     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, $r);
    echo '</div></td></tr>';
}

WordPress Version: 3.8

function wp_theme_update_row($theme_key, $theme)
{
    $current = get_site_transient('update_themes');
    if (!isset($current->response[$theme_key])) {
        return false;
    }
    $r = $current->response[$theme_key];
    $themes_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $theme_name = wp_kses($theme['Name'], $themes_allowedtags);
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $current->response[$theme_key]['url']);
    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    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_themes')) {
        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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['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 theme.</em>'), $theme['Name'], esc_url($details_url), esc_attr($theme['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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key));
    }
    /**
     * 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    $r {
     *     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, $r);
    echo '</div></td></tr>';
}

WordPress Version: 3.7

function wp_theme_update_row($theme_key, $theme)
{
    $current = get_site_transient('update_themes');
    if (!isset($current->response[$theme_key])) {
        return false;
    }
    $r = $current->response[$theme_key];
    $themes_allowedtags = array('a' => array('href' => array(), 'title' => array()), 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 'code' => array(), 'em' => array(), 'strong' => array());
    $theme_name = wp_kses($theme['Name'], $themes_allowedtags);
    $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $current->response[$theme_key]['url']);
    $wp_list_table = _get_list_table('WP_MS_Themes_List_Table');
    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_themes')) {
        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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['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 theme.</em>'), $theme['Name'], esc_url($details_url), esc_attr($theme['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>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url(self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key));
    }
    do_action("in_theme_update_message-{$theme_key}", $theme, $r);
    echo '</div></td></tr>';
}