WordPress at a glance
function is not described

update_recently_edited() WP 1.5.0

Update the "recently-edited" file for the plugin or theme editor.

No Hooks.

Return

null. Nothing.

Usage

update_recently_edited( $file );
$file(string) (required)
-

Changelog

Since 1.5.0 Introduced.

Code of update_recently_edited() WP 5.7.2

<?php
function update_recently_edited( $file ) {
	$oldfiles = (array) get_option( 'recently_edited' );
	if ( $oldfiles ) {
		$oldfiles   = array_reverse( $oldfiles );
		$oldfiles[] = $file;
		$oldfiles   = array_reverse( $oldfiles );
		$oldfiles   = array_unique( $oldfiles );
		if ( 5 < count( $oldfiles ) ) {
			array_pop( $oldfiles );
		}
	} else {
		$oldfiles[] = $file;
	}
	update_option( 'recently_edited', $oldfiles );
}