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.
Main::format_item( array|LifterLMSCLICommandsAddOnLLMS_Add_On $item_or_addon )
Accepts an add-on array and converts it to the format used by the output method
Parameters Parameters
- $item_or_addon
-
(array|LifterLMSCLICommandsAddOnLLMS_Add_On) (Required) Add-on object or add-on item array array from
llms_get_add_ons()
.
Return Return
(array) Associative array containing all possible fields as used by the output method.
Source Source
File: libraries/lifterlms-cli/src/Commands/AddOn/Main.php
private function format_item( $item_or_addon ) { $addon = is_array( $item_or_addon ) ? llms_get_add_on( $item_or_addon ) : $item_or_addon; $formatted = array( 'name' => $addon->get( 'slug' ), 'description' => $addon->get( 'description' ), 'status' => $addon->get_status(), 'license' => str_replace( 'license_', '', $addon->get_license_status() ), 'update' => $addon->has_available_update() ? 'available' : 'none', 'version' => $addon->is_installed() ? $addon->get_installed_version() : 'N/A', 'update_version' => $addon->get( 'version' ), 'title' => $addon->get( 'title' ), 'channel' => $addon->get_channel_subscription(), 'type' => $addon->get( 'type' ), 'file' => $addon->get( 'update_file' ), 'permalink' => $addon->get( 'permalink' ), 'changelog' => $addon->get( 'changelog' ), 'documentation' => $addon->get( 'documentation' ), ); return $formatted; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
0.0.1 | Introduced. |