kompass/bdp-kompass.php

51 lines
1.4 KiB
PHP
Raw Normal View History

2023-12-30 14:28:21 +01:00
<?php
/**
* 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
* Version: 4.1.1
* Tags: bdp, utility, helper
* Requires at least: 6.0
* Requires PHP: 8.2
* Author: Thomas Günther
* Author URI: https://www.sachsen.pfadfinden.de
* Update URI: http://lv-sachsen-main.bdp.mein-verein.online/wordpress/
2023-12-30 14:28:21 +01:00
* Text Domain: bdp-kompass
*/
use Bdp\Modules\Security\Security;
use Bdp\Modules\Seo\Seo;
require_once dirname(__FILE__) . '/includes/setup.php';
2023-12-30 14:28:21 +01:00
function bdp_plugin_install() {
Seo::setup();
Calendar::setup();
Security::setup();
update_option('kompass_installation', true);
}
function bdp_plugin_init() {
Security::ProhibitBots();
Security::SetPageFilters();
remove_menu_page( 'admin.php?page=limit-login-attempts&tab=dashboard' );
if ( get_option( 'kompass_installation' ) == true ) {
delete_option( 'kompass_installation' );
wp_redirect( 'site-health.php?tab=bdp_enhanced_security');
}
2023-12-30 14:28:21 +01:00
}
function register_custom_theme_directory() {
$file = ABSPATH . '/wp-content/plugins/bdp-kompass/buena/' ;
system('mkdir ' . ABSPATH . 'wp-content/themes/buena/');
system('cp -r ' . $file . '* ' . ABSPATH . 'wp-content/themes/buena/');
switch_theme('buena');
}
#add_action( 'after_setup_theme', 'register_custom_theme_directory' );