v4.8.1 #3
@ -12,6 +12,7 @@
|
||||
* Text Domain: bdp-kompass
|
||||
*/
|
||||
|
||||
use Bdp\Libs\WpConfigEditor;
|
||||
use Bdp\Modules\EventParticipants\Controllers\MainController as EventsMain;
|
||||
use Bdp\Modules\KompassSettings\Controllers\SettingsPage as KomnpassSettings;
|
||||
use Bdp\Modules\LimitLoginAttempts\Controllers\OptionsPage as OptionsPageAlias;
|
||||
@ -32,7 +33,9 @@ function bdp_plugin_init() {
|
||||
Security::ProhibitBots();
|
||||
Security::SetPageFilters();
|
||||
|
||||
if (null == get_option('kompass_already_installed', null)) {
|
||||
# WpConfigEditor::updateConfig('DISABLE_WP_CRON', true);
|
||||
|
||||
if (null == get_option('kompass_already_installed', null)) {
|
||||
Seo::setup();
|
||||
Security::setup();
|
||||
update_option('kompass_already_installed', true);
|
||||
|
@ -3,6 +3,8 @@
|
||||
namespace Bdp\Modules\KompassSettings\Controllers;
|
||||
|
||||
|
||||
use Bdp\Libs\WpConfigEditor;
|
||||
|
||||
class SettingsPage
|
||||
{
|
||||
public static function add_menu() {
|
||||
@ -89,6 +91,11 @@ class SettingsPage
|
||||
if (isset($_POST['used_for_state'])) { update_option('paged_used_for_state', true); }
|
||||
if (isset($_POST['self_register'])) { update_option('user_can_register', true); }
|
||||
if (isset($_POST['use_mareike_theme'])) { update_option('use_mareike_theme', true); }
|
||||
if (isset($_POST['external_cronjobs'])) {
|
||||
WpConfigEditor::updateConfig('DISABLE_WP_CRON', true);
|
||||
} else {
|
||||
WpConfigEditor::deleteConfigKey('DISABLE_WP_CRON');
|
||||
}
|
||||
|
||||
kompass_print_message_box('Die Einstellungen wurden gespeichert.');
|
||||
}
|
||||
|
@ -1,4 +1,7 @@
|
||||
<form action="<?php echo esc_url(admin_url('options-general.php?page=kompass-settings')); ?>" method="post">
|
||||
<?php
|
||||
use Bdp\Libs\WpConfigEditor;
|
||||
?>
|
||||
<form action="echo esc_url(admin_url('options-general.php?page=kompass-settings')); ?>" method="post">
|
||||
<input type="hidden" name="save" value="1">
|
||||
<h2>Kompass Einstellungen</h2>
|
||||
<table>
|
||||
@ -15,6 +18,22 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="font-weight: bold; padding: 10px;">Externe Cron-Ausführung</td>
|
||||
<td>
|
||||
<div class="switch-container">
|
||||
<input name="external_cronjobs"
|
||||
<?php
|
||||
if (WpConfigEditor::getConfigValue('DISABLE_WP_CRON') )
|
||||
echo ' checked ';?> type="checkbox" id="external_cronjobs" class="switch">
|
||||
<label for="external_cronjobs" class="switch-label">
|
||||
<span class="switch-inner" data-on="ON" data-off="OFF"></span>
|
||||
<span class="switch-switch"></span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="font-weight: bold; padding: 10px;">Nutzer können sich selbst anmelden</td>
|
||||
<td>
|
||||
|
Loading…
Reference in New Issue
Block a user