Skip to content
Docs
Get RestroPress

Action

rpress_updated

Updated
On this page

Fires once after RestroPress has been updated to a newer version.

Runs on admin_init at priority 5 when the stored plugin version is lower than the current RP_VERSION. The stored version is updated before the action fires, so it runs once per update. Use it for one-off migrations and cache resets.

Available since RestroPress 3.5.

Parameters#

ParameterTypeDescription
$storedstringPrevious version.
$arg2stringCurrent version.

Example#

function my_after_restropress_update( $from, $to ) {
	delete_transient( 'my_restropress_menu_cache' );
}
add_action( 'rpress_updated', 'my_after_restropress_update', 10, 2 );

Notes#

Runs in the admin only. The second argument is the RP_VERSION constant.

Source#

Fired from:

  • includes/install.php (line 544), in rpress_maybe_record_update()
Was this page helpful?