Title: Theme_Upgrader::upgrade_strings
Published: April 25, 2014
Last modified: May 20, 2026

---

# Theme_Upgrader::upgrade_strings()

## In this article

 * [Source](https://developer.wordpress.org/reference/classes/theme_upgrader/upgrade_strings/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/classes/theme_upgrader/upgrade_strings/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/classes/theme_upgrader/upgrade_strings/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/theme_upgrader/upgrade_strings/?output_format=md#wp--skip-link--target)

Initializes the upgrade strings.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/theme_upgrader/upgrade_strings/?output_format=md#source)󠁿

    ```php
    public function upgrade_strings() {
    	$this->strings['up_to_date'] = __( 'The theme is at the latest version.' );
    	$this->strings['no_package'] = __( 'Update package not available.' );
    	/* translators: %s: Package URL. */
    	$this->strings['downloading_package'] = sprintf( __( 'Downloading update from %s&#8230;' ), '<span class="code pre">%s</span>' );
    	$this->strings['unpack_package']      = __( 'Unpacking the update&#8230;' );
    	$this->strings['remove_old']          = __( 'Removing the old version of the theme&#8230;' );
    	$this->strings['remove_old_failed']   = __( 'Could not remove the old theme.' );
    	$this->strings['process_failed']      = __( 'Theme update failed.' );
    	$this->strings['process_success']     = __( 'Theme updated successfully.' );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/class-theme-upgrader.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/class-theme-upgrader.php#L55)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/class-theme-upgrader.php#L55-L65)

## 󠀁[Related](https://developer.wordpress.org/reference/classes/theme_upgrader/upgrade_strings/?output_format=md#related)󠁿

| Uses | Description | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  |

| Used by | Description | 
| [Theme_Upgrader::upgrade()](https://developer.wordpress.org/reference/classes/theme_upgrader/upgrade/)`wp-admin/includes/class-theme-upgrader.php` |

Upgrades a theme.

  | 
| [Theme_Upgrader::bulk_upgrade()](https://developer.wordpress.org/reference/classes/theme_upgrader/bulk_upgrade/)`wp-admin/includes/class-theme-upgrader.php` |

Upgrades several themes at once.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/theme_upgrader/upgrade_strings/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.8.0](https://developer.wordpress.org/reference/since/2.8.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Ftheme_upgrader%2Fupgrade_strings%2F)
before being able to contribute a note or feedback.