LLMS_Admin_Tool_Course_Data_Lock_Eraser::get_locked_courses()
Retrieve the number of course data locks.
Return Return
(int)
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;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 9.0.0 | Introduced. |