LLMS_Sidebars::get_sidebars()

Get a filtered array of sidebars to register


Return Return

(array)


Top ↑

Source Source

File: includes/class.llms.sidebars.php

184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
public static function get_sidebars() {
 
    $sidebars = array(
        apply_filters(
            'lifterlms_register_lesson_sidebar',
            array(
                'id'          => 'llms_course_widgets_side',
                'description' => __( 'Widgets in this area will be shown on LifterLMS courses.', 'lifterlms' ),
                'name'        => __( 'Course Sidebar', 'lifterlms' ),
            )
        ),
        apply_filters(
            'lifterlms_register_course_sidebar',
            array(
                'description' => __( 'Widgets in this area will be shown on LifterLMS lessons.', 'lifterlms' ),
                'id'          => 'llms_lesson_widgets_side',
                'name'        => __( 'Lesson Sidebar', 'lifterlms' ),
            )
        ),
    );
 
    $settings = apply_filters(
        'llms_sidebar_settings',
        array(
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
            'after_widget'  => '</li>',
            'before_title'  => '<h2 class="widgettitle">',
            'after_title'   => '</h2>',
        )
    );
 
    foreach ( $sidebars as &$s ) {
 
        $s = array_merge( $settings, $s );
 
    }
 
    return $sidebars;
}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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