5 Commits

Author SHA1 Message Date
574f670ee0 Small Bugfix 2024-08-12 15:55:53 +02:00
073c167746 Merge pull request 'v4.8.1' (#3) from v4.8.1 into main
Reviewed-on: #3
2024-08-12 15:51:56 +02:00
bca4f2639b Added Control element for manual cronjobs 2024-08-12 15:49:46 +02:00
f7ca614b38 Added Control element for manual cronjobs 2024-08-12 15:48:55 +02:00
ca02db7b28 Bugfixes 2024-08-12 15:26:09 +02:00
6 changed files with 48 additions and 4 deletions

View File

@ -6,7 +6,7 @@
"version": "4.3.2", "version": "4.3.2",
"download_url": "http://lv-sachsen-main.bdp.mein-verein.online/wordpress/bdp-kompass-4.3.2.zip", "download_url": "http://lv-sachsen-main.bdp.mein-verein.online/wordpress/bdp-kompass-4.3.2.zip",
"requires": "6.0", "requires": "6.0",
"tested": "6.5", "tested": "6.7",
"requires_php": "8.2", "requires_php": "8.2",
"last_updated": "02.03.2024 16:24:00", "last_updated": "02.03.2024 16:24:00",
"sections": { "sections": {

View File

@ -6,7 +6,7 @@
"version": "%version%", "version": "%version%",
"download_url": "http://lv-sachsen-main.bdp.mein-verein.online/wordpress/bdp-kompass-%version%.zip", "download_url": "http://lv-sachsen-main.bdp.mein-verein.online/wordpress/bdp-kompass-%version%.zip",
"requires": "6.0", "requires": "6.0",
"tested": "6.5", "tested": "6.7",
"requires_php": "8.2", "requires_php": "8.2",
"last_updated": "%date%", "last_updated": "%date%",
"sections": { "sections": {

View File

@ -2,7 +2,7 @@
/** /**
* Plugin Name: BdP Kompass * Plugin Name: BdP Kompass
* Description: Wordpress-Plugin zur Unterstützung von Stämmen im Bund der Pfadfinderinnen und Pfadfinder e.V. zur optimalen Verwaltung eurer Webseite * Description: Wordpress-Plugin zur Unterstützung von Stämmen im Bund der Pfadfinderinnen und Pfadfinder e.V. zur optimalen Verwaltung eurer Webseite
* Version: 4.8.1 * Version: 4.8.3
* Tags: bdp, utility, helper * Tags: bdp, utility, helper
* Requires at least: 6.0 * Requires at least: 6.0
* Requires PHP: 8.2 * Requires PHP: 8.2
@ -12,6 +12,7 @@
* Text Domain: bdp-kompass * Text Domain: bdp-kompass
*/ */
use Bdp\Libs\WpConfigEditor;
use Bdp\Modules\EventParticipants\Controllers\MainController as EventsMain; use Bdp\Modules\EventParticipants\Controllers\MainController as EventsMain;
use Bdp\Modules\KompassSettings\Controllers\SettingsPage as KomnpassSettings; use Bdp\Modules\KompassSettings\Controllers\SettingsPage as KomnpassSettings;
use Bdp\Modules\LimitLoginAttempts\Controllers\OptionsPage as OptionsPageAlias; use Bdp\Modules\LimitLoginAttempts\Controllers\OptionsPage as OptionsPageAlias;
@ -32,7 +33,9 @@ function bdp_plugin_init() {
Security::ProhibitBots(); Security::ProhibitBots();
Security::SetPageFilters(); 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(); Seo::setup();
Security::setup(); Security::setup();
update_option('kompass_already_installed', true); update_option('kompass_already_installed', true);

View File

@ -1,3 +1,18 @@
<h4>Version 4.8.3</h4>
<ul>
<li>Bugfix</li>
</ul>
<h4>Version 4.8.2</h4>
<ul>
<li>Added Control element for manual cronjobs</li>
</ul>
<h4>Version 4.8.1</h4>
<ul>
<li>Handling of deprecated components</h4>
</ul>
<h4>Version 4.6.2</h4> <h4>Version 4.6.2</h4>
<ul> <ul>
<li>Bugfixes</li> <li>Bugfixes</li>

View File

@ -3,6 +3,8 @@
namespace Bdp\Modules\KompassSettings\Controllers; namespace Bdp\Modules\KompassSettings\Controllers;
use Bdp\Libs\WpConfigEditor;
class SettingsPage class SettingsPage
{ {
public static function add_menu() { 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['used_for_state'])) { update_option('paged_used_for_state', true); }
if (isset($_POST['self_register'])) { update_option('user_can_register', 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['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.'); kompass_print_message_box('Die Einstellungen wurden gespeichert.');
} }

View File

@ -1,3 +1,6 @@
<?php
use Bdp\Libs\WpConfigEditor;
?>
<form action="<?php echo esc_url(admin_url('options-general.php?page=kompass-settings')); ?>" method="post"> <form action="<?php echo esc_url(admin_url('options-general.php?page=kompass-settings')); ?>" method="post">
<input type="hidden" name="save" value="1"> <input type="hidden" name="save" value="1">
<h2>Kompass Einstellungen</h2> <h2>Kompass Einstellungen</h2>
@ -15,6 +18,22 @@
</td> </td>
</tr> </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> <tr>
<td style="font-weight: bold; padding: 10px;">Nutzer können sich selbst anmelden</td> <td style="font-weight: bold; padding: 10px;">Nutzer können sich selbst anmelden</td>
<td> <td>