update_recently_edited

Definition:
function update_recently_edited( $file ) {}

Parameters

  • unknown_type $file

Source code

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 );

}

3201

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: