LLMS_Admin_Import::handle_generation( string|array $raw )

Instantiate and generate raw data via LLMS_Generator


Parameters Parameters

$raw

(string|array) (Required) A JSON string or array or raw data which can be parsed by an LLMS_Generator instance.


Top ↑

Return Return

(WP_Error|boolean) On success, returns true or an error object on failure.


Top ↑

Source Source

File: includes/admin/class.llms.admin.import.php

	protected function handle_generation( $raw ) {

		$generator = new LLMS_Generator( $raw );
		if ( is_wp_error( $generator->set_generator() ) ) {
			return $this->show_error( $generator->error );
		}

		$generator->generate();
		if ( $generator->is_error() ) {
			return $this->show_error( $generator->error );
		}

		LLMS_Admin_Notices::flash_notice( $this->get_success_message( $generator ), 'success' );
		return true;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.8.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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