LLMS_REST_Students_Progress_Controller::validate_date_created( string $value, WP_REST_Request $request, string $param )

Validate the date_created


Parameters Parameters

$value

(string) (Required) Date string.

$request

(WP_REST_Request) (Required) Request object.

$param

(string) (Required) Parameter name ("post_id").


Top ↑

Return Return

(bool)


Top ↑

Source Source

File: libraries/lifterlms-rest/includes/server/class-llms-rest-students-progress-controller.php

	 * @param string          $value Date string.
	 * @param WP_REST_Request $request Request object.
	 * @param string          $param Parameter name ("post_id").
	 * @return bool
	 */
	public function validate_date_created( $value, $request, $param ) {

		$ts  = rest_parse_date( $value );
		$now = llms_current_time( 'U' );

		if ( $ts > $now ) {


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.