LLMS_Settings_General::get_settings( $settings_only = false )
Get settings array.
Return Return
(array)
Source Source
File: includes/admin/settings/class.llms.settings.general.php
public function get_settings( $settings_only = false ) { $settings = array(); if ( ! $settings_only ) { $settings[] = array( 'type' => 'custom-html', 'value' => self::get_stats_widgets(), ); $settings[] = array( 'type' => 'custom-html', 'value' => self::get_small_banners(), ); } $settings[] = array( 'type' => 'sectionstart', 'id' => 'general_information', 'class' => 'top', ); $settings[] = array( 'title' => __( 'Quick Links', 'lifterlms' ), 'type' => 'title', 'desc' => ' <div class="llms-list"> <ul> <li><p>' . sprintf( __( 'Version: %s', 'lifterlms' ), llms()->version ) . '</p></li> <li><p>' . sprintf( __( 'Need help? Get support on the %1$sforums%2$s', 'lifterlms' ), '<a href="https://wordpress.org/support/plugin/lifterlms" target="_blank">', '</a>' ) . '</p></li> <li><p>' . sprintf( __( 'Looking for a quickstart guide, shortcodes, or developer documentation? Get started at %s', 'lifterlms' ), '<a href="https://lifterlms.com/docs" target="_blank">https://lifterlms.com/docs</a>' ) . '</p></li> <li><p>' . sprintf( __( 'Get LifterLMS news, updates, and more on our %1$sblog%2$s', 'lifterlms' ), '<a href="http://blog.lifterlms.com/" target="_blank">', '</a>' ) . '</p></li> </ul> </div>', 'id' => 'activation_options', ); $settings[] = array( 'type' => 'sectionend', 'id' => 'general_information', ); $settings[] = array( 'id' => 'section_features', 'type' => 'sectionstart', ); $settings[] = array( 'id' => 'features', 'title' => __( 'Features', 'lifterlms' ), 'type' => 'title', ); $settings[] = array( 'type' => 'custom-html', 'value' => sprintf( __( 'Automatic Recurring Payments: <strong>%s</strong>', 'lifterlms' ), LLMS_Site::get_feature( 'recurring_payments' ) ? __( 'Enabled', 'lifterlms' ) : __( 'Disabled', 'lifterlms' ) ), ); $settings[] = array( 'id' => 'section_features', 'type' => 'sectionend', ); $settings[] = array( 'id' => 'section_tools', 'type' => 'sectionstart', ); $settings[] = array( 'id' => 'general_settings', 'title' => __( 'General Settings', 'lifterlms' ), 'type' => 'title', ); $settings[] = array( 'class' => 'llms-select2', 'custom_attributes' => array( 'data-placeholder' => __( 'Select user roles', 'lifterlms' ), ), 'default' => array( 'administrator', 'lms_manager', 'instructor', 'instructors_assistant' ), 'desc' => __( 'Users with the selected roles will bypass enrollment, drip, and prerequisite restrictions for courses and memberships.', 'lifterlms' ), 'id' => 'llms_grant_site_access', 'options' => array_filter( LLMS_Roles::get_all_role_names(), function ( $role ) { return 'student' !== $role; }, ARRAY_FILTER_USE_KEY ), 'title' => __( 'Unrestricted Preview Access', 'lifterlms' ), 'type' => 'multiselect', ); $settings[] = array( 'title' => __( 'Content Protection', 'lifterlms' ), 'desc' => __( 'Prevent users from copying website content and downloading images.', 'lifterlms' ) . '<br><span class="description">' . __( 'Users with Unrestricted Preview Access will not be affected by this setting.', 'lifterlms' ) . '</span>', 'id' => 'lifterlms_content_protection', 'default' => 'no', 'type' => 'checkbox', ); $settings[] = array( 'id' => 'general_settings', 'type' => 'sectionend', ); return apply_filters( 'lifterlms_general_settings', $settings ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.6.0 | use LLMS_Roles::get_all_role_names() to retrieve the list of roles who can bypass enrollments. Add content protection setting. |
3.13.0 | Unknown. |
1.0.0 | Introduced. |