LLMS_Generator::get_stats()
Get “stats” about the generated content.
Return Return
(array)
Source Source
File: includes/class.llms.generator.php
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 | public function get_stats() { $stats = array (); foreach ( $this ->generated as $type => $ids ) { $stats [ $type ] = count ( $ids ); } // Add old plural keys that were guaranteed to exist. $backwards_compat = array ( 'course' => 'courses' , 'section' => 'sections' , 'lesson' => 'lessons' , 'access_plan' => 'plans' , 'quiz' => 'quizzes' , 'question' => 'questions' , 'term' => 'terms' , 'user' => 'authors' , ); foreach ( $backwards_compat as $curr => $old ) { $stats [ $old ] = isset( $stats [ $curr ] ) ? $stats [ $curr ] : 0; } return $stats ; } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |