LLMS_Generator::get_stats()
Get “stats” about the generated content.
Return Return
(array)
Source Source
File: includes/class.llms.generator.php
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. |