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.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.generator.php

395
396
397
398
399
400
401
402
403
404
405
406
407
408
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

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.