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.
Return Return
(string)
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; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |