Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Generator::add_course_terms( obj $course_id, array $raw_terms )

Add taxonomy terms to a course


Parameters Parameters

$course_id

(obj) (Required) WP_Post ID of a Course.

$raw_terms

(array) (Required) Array of raw term arrays.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class.llms.generator.php

128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
    /**
     * Action run immediately prior to a LifterLMS Generator running.
     *
     * @since 3.30.2
     *
     * @param LLMS_Generator $generator The generator instance.
     */
    do_action( 'llms_generator_before_generate', $this );
 
    try {
        call_user_func( $this->generator, $this->raw );
    } catch ( Exception $exception ) {
        $this->error->add( $this->get_error_code( $exception->getCode(), $this->generator[0] ), $exception->getMessage(), $exception->getTrace() );
    }
 
    /**
     * Action run immediately after a LifterLMS Generator running.
     *
     * @since 3.30.2
     *
     * @param LLMS_Generator $generator The generator instance.
     */
    do_action( 'llms_generator_after_generate', $this );
 
    if ( $this->is_error() ) {
        $wpdb->query( 'ROLLBACK' ); // db call ok; no-cache ok.
    } else {
        $wpdb->query( 'COMMIT' ); // db call ok; no-cache ok.
    }
 
}
 
/**
 * Retrieve a human-readable error code from a machine-readable error number
 *
 * @since 4.7.0
 * @since 4.9.0 Handle PHP core errors, warnings, notices, etc... with a human-readable error code.

Top ↑

Changelog Changelog

Changelog
Version Description
3.7.5 Unknown.
3.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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