LLMS_Settings_Notifications::get_settings()
Get settings array
Return Return
(array)
Source Source
File: includes/admin/settings/class.llms.settings.notifications.php
public function get_settings() {
$settings = array();
$settings[] = array(
'class' => 'top',
'id' => 'notification_options',
'type' => 'sectionstart',
);
$settings[] = array(
'title' => __( 'Notification Settings', 'lifterlms' ),
'type' => 'title',
'id' => 'notification_options_title',
);
if ( isset( $_GET['notification'] ) ) {
$controller = llms()->notifications()->get_controller( llms_filter_input_sanitize_string( INPUT_GET, 'notification' ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( $controller ) {
$settings = array_merge( $settings, $this->get_notification_settings( $controller ) );
} else {
$settings[] = array(
'id' => 'notification_options_invalid_error',
'type' => 'custom-html',
'value' => __( 'Invalid notification', 'lifterlms' ),
);
}
} else {
$settings[] = array(
'id' => 'llms_notifications_table',
'table' => new LLMS_Table_NotificationSettings(),
'type' => 'table',
);
}
$settings[] = array(
'id' => 'notification_options',
'type' => 'sectionend',
);
return apply_filters( 'lifterlms_notifications_settings', $settings );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.8.0 | |
| 3.30.3 | Introduced. |