LLMS_Generator::record_generation( int $id, string $key )
Records a generated post id
Parameters Parameters
- $id
-
(int) (Required) WP Post ID of the generated post.
- $key
-
(string) (Required) Key of the stat to increment.
Return Return
(void)
Source Source
File: includes/class.llms.generator.php
protected function record_generation( $id, $key ) { // Remove LifterLMS Prefix from the key (if it exists). $key = str_replace( 'llms_', '', $key ); // Add an array if it doesn't already exist. if ( ! isset( $this->generated[ $key ] ) ) { $this->generated[ $key ] = array(); } // Record the ID. $this->generated[ $key ][] = $id; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.7.0 | Modified method access from private to protected . Add IDs to the generated variable in favor of posts . |
3.14.8 | Introduced. |