LLMS_Nav_Menus::customize_add_items( array $items = array(), string $type = '', string $object = '', integer $page )
Adds LifterLMS menu items to the customizer.
Parameters Parameters
- $items
-
(array) (Optional) Menu items.
Default value: array()
- $type
-
(string) (Optional) Requested menu item type.
Default value: ''
- $object
-
(string) (Optional) Requested menu item object.
Default value: ''
- $page
-
(integer) (Optional) Requested page number. Default
0.
Return Return
(array)
Source Source
File: includes/class.llms.nav.menus.php
public function customize_add_items( $items = array(), $type = '', $object = '', $page = 0 ) {
if ( 'llms_nav' !== $object ) {
return $items;
}
foreach ( $this->get_nav_items() as $id => $data ) {
$items[] = array(
'classes' => 'llms-nav-item-' . $id,
'id' => $id,
'title' => $data['title'],
'type_label' => __( 'Custom Link', 'lifterlms' ),
'url' => esc_url_raw( $data['url'] ),
);
}
return array_slice( $items, 10 * $page, 10 );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.14.7 | Introduced. |