LLMS_Generator::record_generation( int $id, string $key )

Records a generated post id

Parameters Parameters


(int) (Required) WP Post ID of the generated post.


(string) (Required) Key of the stat to increment.

Top ↑

Return Return


Top ↑

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;


Top ↑

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.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.