: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
echo et_get_safe_localization( sprintf(
__( 'You\'ll be rolled back to <strong>Version %1$s</strong> from the current <strong>Version %2$s</strong>.', 'et-core' ),
esc_html( $this->_get_previous_installed_version() ),
esc_html( $this->_get_latest_installed_version() )
echo et_get_safe_localization( sprintf(
__( 'Rolling back will reinstall the previous version of %1$s. You will be able to update to the latest version at any time. <a href="%2$s" target="_blank">Learn more here</a>.', 'et-core' ),
esc_html( $this->product_name ),
esc_url( $this->_get_update_documentation_url() )
<?php esc_html_e( 'Make sure you have a full site backup before proceeding.', 'et-core' ); ?>
<a class="et-core-modal-action et-core-version-rollback-confirm" href="<?php echo esc_url( $url ); ?>">
<?php esc_html_e( 'Rollback to the previous version', 'et-core' ); ?>
* Render ePanel warning modal when a rollback has already been done.
public function render_epanel_already_rolled_back_modal() {
<div class="et-core-modal-overlay et-core-form et-core-version-rollback-modal">
<div class="et-core-modal">
<div class="et-core-modal-header">
<h3 class="et-core-modal-title">
<?php esc_html_e( 'Version Rollback', 'et-core' ); ?>
<a href="#" class="et-core-modal-close" data-et-core-modal="close"></a>
<div id="et-core-version-rollback-modal-content">
<div class="et-core-modal-content">
echo et_get_safe_localization( sprintf(
__( 'You\'re currently rolled back to <strong>Version %1$s</strong> from <strong>Version %2$s</strong>.', 'et-core' ),
esc_html( $this->_get_latest_installed_version() ),
esc_html( $this->_get_previous_installed_version() )
echo et_get_safe_localization( sprintf(
__( 'Update to the latest version to unlock the full power of %1$s. <a href="%2$s" target="_blank">Learn more here</a>.', 'et-core' ),
esc_html( $this->product_name ),
esc_url( $this->_get_update_documentation_url() )
<a class="et-core-modal-action" href="<?php echo esc_url( admin_url( 'update-core.php' ) ); ?>">
<?php esc_html_e( 'Update to the Latest Version', 'et-core' ); ?>
* Store latest and previous installed version.
public function store_previous_version_number() {
$previous_installed_version = $this->_get_previous_installed_version();
$latest_installed_version = $this->_get_latest_installed_version();
// Get the theme version since the files may have changed but
// we are still executing old code from memory.
$theme_version = et_get_theme_version();
if ( $latest_installed_version === $theme_version ) {
if ( empty( $latest_installed_version ) ) {
$latest_installed_version = $theme_version;
if ( version_compare( $theme_version, $latest_installed_version, '!=') ) {
$previous_installed_version = $latest_installed_version;
$latest_installed_version = $theme_version;
$this->_set_previous_installed_version( $previous_installed_version );
$this->_set_latest_installed_version( $latest_installed_version );