v4.8.1 #3

Merged
th.guenther merged 14 commits from v4.8.1 into main 2024-08-12 15:51:56 +02:00
3 changed files with 31 additions and 2 deletions
Showing only changes of commit f7ca614b38 - Show all commits

View File

@ -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,6 +33,8 @@ function bdp_plugin_init() {
Security::ProhibitBots();
Security::SetPageFilters();
# WpConfigEditor::updateConfig('DISABLE_WP_CRON', true);
if (null == get_option('kompass_already_installed', null)) {
Seo::setup();
Security::setup();

View File

@ -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.');
}

View File

@ -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>