LLMS_REST_API_Key::get_last_access_date()

Retrieve a human-readable date/time string for the date the key was last used.


Description Description

Uses WP Core date & time formatting settings.


Top ↑

Return Return

(string)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/models/class-llms-rest-api-key.php

	public function get_last_access_date() {

		$date = __( 'None', 'lifterlms' );
		if ( ! empty( $this->get( 'last_access' ) ) ) {
			$time = strtotime( $this->get( 'last_access' ) );
			// Translators: %1$s: Last access date; %2$s: Last access time.
			$date = sprintf( __( '%1$s at %2$s', 'lifterlms' ), date_i18n( get_option( 'date_format' ), $time ), date_i18n( get_option( 'time_format' ), $time ) );
		}

		return apply_filters( 'llms_rest_api_key_get_last_access_date', $date, $this );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
1.0.0-beta.1 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.