Upload file wp-business-forum.php via GUI
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Plugin Name: WP Business Forum
|
||||
* Plugin URI: https://git.viper.ipv64.net/M_Viper/WP-Business-Forum
|
||||
* Description: Professionelles Forum mit eigenem Login, Rollen, Signaturen, Hierarchie und Moderations-Tools.
|
||||
* Version: 1.0.0
|
||||
* Version: 1.0.1
|
||||
* Author: M_Viper
|
||||
* Author URI: https://m-viper.de
|
||||
* Text Domain: wp-business-forum
|
||||
@@ -13,7 +13,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
define( 'WBF_PATH', plugin_dir_path( __FILE__ ) );
|
||||
define( 'WBF_URL', plugin_dir_url( __FILE__ ) );
|
||||
define( 'WBF_VERSION', '1.0.0' );
|
||||
define( 'WBF_VERSION', '1.0.1' );
|
||||
|
||||
require_once WBF_PATH . 'includes/class-forum-db.php';
|
||||
require_once WBF_PATH . 'includes/class-forum-roles.php';
|
||||
@@ -46,6 +46,19 @@ add_filter( 'body_class', function( $classes ) {
|
||||
return $classes;
|
||||
});
|
||||
|
||||
// ── Cron: Abgelaufene Sperren aufheben ────────────────────────────────────────
|
||||
add_action( 'wbf_check_expired_bans', function() {
|
||||
WBF_DB::check_expired_bans();
|
||||
} );
|
||||
|
||||
if ( ! wp_next_scheduled( 'wbf_check_expired_bans' ) ) {
|
||||
wp_schedule_event( time(), 'hourly', 'wbf_check_expired_bans' );
|
||||
}
|
||||
|
||||
register_deactivation_hook( __FILE__, function() {
|
||||
wp_clear_scheduled_hook( 'wbf_check_expired_bans' );
|
||||
} );
|
||||
|
||||
|
||||
// ── Forum-URL Hilfsfunktion ───────────────────────────────────────────────────
|
||||
function wbf_get_forum_url() {
|
||||
@@ -83,5 +96,6 @@ add_action( 'wp_enqueue_scripts', function() {
|
||||
'my_id' => $wbf_user ? (int)$wbf_user->id : 0,
|
||||
'unread_dm' => $wbf_user ? WBF_DB::count_unread_messages($wbf_user->id) : 0,
|
||||
'forum_url' => wbf_get_forum_url(),
|
||||
'reactions' => WBF_DB::get_allowed_reactions(),
|
||||
]);
|
||||
});
|
||||
Reference in New Issue
Block a user