LLMS_Admin_Tool_Course_Data_Lock_Eraser::get_locked_courses()

Retrieve the number of course data locks.


Return Return

(int)


Top ↑

Source Source

File: includes/admin/tools/class-llms-admin-tool-course-data-lock-eraser.php

	protected function get_locked_courses() {

		$count = wp_cache_get( $this->id, 'llms_tool_data' );
		if ( false === $count ) {

			global $wpdb;
			$count = absint( $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->postmeta} WHERE meta_key = '_llms_temp_calc_data_lock';" ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery

			wp_cache_set( $this->id, $count, 'llms_tool_data' );

		}

		return $count;
	}


Top ↑

Changelog Changelog

Changelog
Version Description
9.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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