Gets aggregate form statistics for the evaluator.
Description
See also
Parameters
- $form_id
-
(int) (Required) Form ID.
Return
(array) Array of statistics, or empty array if nothing set yet.
Source
File: src/modules/evaluators/evaluator.php
public function get_stats( $form_id ) { $stats = $this->module->manager()->meta()->get( 'post', $form_id, $this->module->manager()->get_prefix() . 'stats', true ); if ( ! is_array( $stats ) ) { return array(); } $stats_slug = $this->get_meta_identifier(); if ( ! isset( $stats[ $stats_slug ] ) ) { return array(); } return $stats[ $stats_slug ]; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |