LLMS_Admin_Import::get_success_message( LLMS_Generator $generator )

Retrieves a “Success” message providing information about the imported content.


Parameters Parameters

$generator

(LLMS_Generator) (Required) Generator instance.


Top ↑

Return Return

(string)


Top ↑

Source Source

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

	protected function get_success_message( $generator ) {

		$msg  = '<strong>' . __( 'Import Successful!', 'lifterlms' ) . '</strong><br>';
		$msg .= '<ul>';

		$generated = $generator->get_generated_content();

		if ( ! empty( $generated['course'] ) ) {
			// Translators: %s = comma-separated list of anchors to the imported courses.
			$msg .= '<li>' . sprintf( __( 'Imported courses: %s', 'lifterlms' ), $this->get_generated_content_list( $generated['course'], 'post' ) ) . '</li>';
		}
		if ( ! empty( $generated['user'] ) ) {
			// Translators: %s = comma-separated list of anchors to the imported users.
			$msg .= '<li>' . sprintf( __( 'Imported users: %s', 'lifterlms' ), $this->get_generated_content_list( $generated['user'], 'user' ) ) . '</li>';
		}

		$msg .= '</ul>';

		return $msg;

	}


Top ↑

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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