LLMS_Admin_Review::round_down( int $number )

Round a number down to a big-ish round number


Parameters Parameters

$number

(int) (Required) Input number.


Top ↑

Return Return

(int)


Top ↑

Source Source

File: includes/admin/class-llms-admin-review.php

					'time'      => $time,
					'dismissed' => false,
				)
			);
			return false;

		}

		// Review has not been dismissed and LifterLMS has been installed at least a week.
		if ( ( isset( $review['dismissed'] ) && ! $review['dismissed'] ) && isset( $review['time'] ) && ( $review['time'] + WEEK_IN_SECONDS <= $time ) ) {

			// Show if the enrollments threshold is reached.
			global $wpdb;
			$enrollments = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}lifterlms_user_postmeta WHERE meta_key = '_status' AND meta_value = 'enrolled'" ); // no-cache ok.

		}

		// Only load if we have 30 or more enrollments.
		if ( $enrollments < 30 ) {


Top ↑

Changelog Changelog

Changelog
Version Description
4.14.0 Numbers less than 10 are not rounded & numbers less than 100 are rounded to the nearest 10.
3.24.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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