Compare commits
No commits in common. "main" and "1.0.3" have entirely different histories.
13
README.md
13
README.md
@ -36,6 +36,19 @@ Das WP Multi Toolkit ist ein **wichtiges Pflichtplugin** der WP Multi Plugin-Rei
|
||||
* [Microsoft Teams Support](https://teams.live.com/l/community/FEAzokphpZTJ2u6OgI)
|
||||
* [Telegram Support](https://t.me/M_Viper04)
|
||||
|
||||
## Technische Details
|
||||
|
||||
* **Plugin Name:** WP Multi Toolkit
|
||||
* **Plugin URI:** [https://git.viper.ipv64.net/M\_Viper/wp-multi-toolkit](https://git.viper.ipv64.net/M_Viper/wp-multi-toolkit)
|
||||
* **Version:** 1.0.1
|
||||
* **Author:** M\_Viper
|
||||
* **Author URI:** [https://m-viper.de](https://m-viper.de)
|
||||
* **Requires at least:** 6.7.2
|
||||
* **Tested up to:** 6.7.2
|
||||
* **License:** GPL2
|
||||
* **License URI:** [https://www.gnu.org/licenses/gpl-2.0.html](https://www.gnu.org/licenses/gpl-2.0.html)
|
||||
* **Text Domain:** wp-multi-toolkit
|
||||
|
||||
## Lizenz
|
||||
|
||||
Dieses Plugin ist unter der GPL2-Lizenz lizenziert.
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Plugin Name: WP Multi Toolkit
|
||||
* Plugin URI: https://git.viper.ipv64.net/M_Viper/wp-multi-toolkit
|
||||
* Description: Ein umfassendes Toolkit inklusive WP Multi Funktionen und Update-Management für zugehörige Plugins.
|
||||
* Version: 1.0.4
|
||||
* Version: 1.0.2
|
||||
* Author: M_Viper
|
||||
* Author URI: https://m-viper.de
|
||||
* Requires at least: 6.7.2
|
||||
@ -18,80 +18,14 @@
|
||||
|
||||
defined('ABSPATH') or die('No direct access allowed.');
|
||||
|
||||
// Funktion, um zukünftige Posts zu veröffentlichen
|
||||
function pubMissedPosts() {
|
||||
if (is_front_page() || is_single()) {
|
||||
global $wpdb;
|
||||
$now = gmdate('Y-m-d H:i:00');
|
||||
|
||||
// Überprüfe, ob benutzerdefinierte Beitragstypen vorhanden sind
|
||||
$args = array(
|
||||
'public' => true,
|
||||
'_builtin' => false,
|
||||
);
|
||||
|
||||
$output = 'names'; // names oder objects, names ist der Standard
|
||||
$operator = 'and'; // 'and' oder 'or'
|
||||
$post_types = get_post_types($args, $output, $operator);
|
||||
|
||||
if (count($post_types) === 0) {
|
||||
$sql = "SELECT ID FROM $wpdb->posts WHERE post_type IN ('post', 'page') AND post_status = 'future' AND post_date_gmt < '$now'";
|
||||
} else {
|
||||
$str = implode('\',\'', $post_types);
|
||||
$sql = "SELECT ID FROM $wpdb->posts WHERE post_type IN ('page', 'post', '$str') AND post_status = 'future' AND post_date_gmt < '$now'";
|
||||
}
|
||||
|
||||
$resulto = $wpdb->get_results($sql);
|
||||
if ($resulto) {
|
||||
foreach ($resulto as $thisarr) {
|
||||
wp_publish_post($thisarr->ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Die Funktion beim Laden der Seite aufrufen
|
||||
add_action('wp_head', 'pubMissedPosts');
|
||||
|
||||
/*
|
||||
* Abhängigkeitsprüfung: WP Multi Kategorie
|
||||
*/
|
||||
function wp_multi_toolkit_check_kategorie_dependency() {
|
||||
if (!function_exists('is_plugin_active')) {
|
||||
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
|
||||
}
|
||||
|
||||
// Prüfen, ob WP Multi Kategorie installiert und aktiv ist
|
||||
if (!is_plugin_active('wp-multi-kategorie/wp-multi-kategorie.php')) {
|
||||
add_action('admin_notices', 'wp_multi_toolkit_kategorie_dependency_notice');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Admin-Hinweis, falls Abhängigkeit fehlt
|
||||
function wp_multi_toolkit_kategorie_dependency_notice() {
|
||||
?>
|
||||
<div class="notice notice-warning">
|
||||
<p>
|
||||
<?php _e('Das Plugin "WP Multi Toolkit" empfiehlt die Installation von "WP Multi Kategorie", um alle Funktionen nutzen zu können.', 'wp-multi-toolkit'); ?>
|
||||
<a href="https://git.viper.ipv64.net/M_Viper/WP-Multi-Kategorie/releases" target="_blank" class="button button-primary" style="margin-left: 10px;">
|
||||
<?php _e('WP Multi Kategorie herunterladen', 'wp-multi-toolkit'); ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
wp_multi_toolkit_check_kategorie_dependency();
|
||||
|
||||
/*
|
||||
* Gitea - Ticket - BUG - Report
|
||||
*/
|
||||
*/
|
||||
|
||||
// Funktion zur Erstellung eines Support-Tickets
|
||||
function send_support_ticket_to_server($plugin_name, $title, $description, $label = 'bug') {
|
||||
$server_url = 'https://m-viper.de/gitea-issue-creator.php';
|
||||
|
||||
// Hier wird das Plugin korrekt übergeben
|
||||
$data = [
|
||||
'plugin' => $plugin_name,
|
||||
'title' => $title,
|
||||
@ -125,48 +59,47 @@ function send_support_ticket_to_server($plugin_name, $title, $description, $labe
|
||||
}
|
||||
}
|
||||
|
||||
// Support-Ticket Formular
|
||||
// Formular für das Support-Ticket mit Design
|
||||
function support_ticket_form() {
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h1 class="wp-multi-support-title"><?php _e('WP-Multi Support', 'wp-multi-toolkit'); ?></h1>
|
||||
<h1 class="wp-multi-support-title">WP-Multi Support</h1>
|
||||
<div class="support-form-container">
|
||||
<form method="post" class="wp-multi-support-form">
|
||||
<div class="form-group">
|
||||
<label for="plugin_name"><?php _e('Wählen Sie das Plugin', 'wp-multi-toolkit'); ?></label>
|
||||
<label for="plugin_name">Wählen Sie das Plugin</label>
|
||||
<select name="plugin_name" id="plugin_name" required>
|
||||
<option value="wp-multi"><?php _e('WP Multi', 'wp-multi-toolkit'); ?></option>
|
||||
<option value="wp-multi-search"><?php _e('WP Multi Search', 'wp-multi-toolkit'); ?></option>
|
||||
<option value="wp-multi-toolkit"><?php _e('WP Multi Toolkit', 'wp-multi-toolkit'); ?></option>
|
||||
<option value="wp-multi-comment-notifications"><?php _e('WP Multi Comment Notifications', 'wp-multi-toolkit'); ?></option>
|
||||
<option value="wp-multi-kategorie"><?php _e('WP Multi Kategorie', 'wp-multi-toolkit'); ?></option>
|
||||
<option value="wp-multi">WP Multi</option>
|
||||
<option value="wp-multi-search">WP Multi Search</option>
|
||||
<option value="wp-multi-toolkit">WP Multi Toolkit</option>
|
||||
<option value="wp-multi-comment-notifications">WP Multi Comment Notifications</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="ticket_title"><?php _e('Ticket-Titel', 'wp-multi-toolkit'); ?></label>
|
||||
<input type="text" name="ticket_title" id="ticket_title" required placeholder="<?php _e('Geben Sie den Titel ein', 'wp-multi-toolkit'); ?>" />
|
||||
<label for="ticket_title">Ticket-Titel</label>
|
||||
<input type="text" name="ticket_title" id="ticket_title" required placeholder="Geben Sie den Titel ein" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="ticket_description"><?php _e('Ticket-Beschreibung', 'wp-multi-toolkit'); ?></label>
|
||||
<textarea name="ticket_description" id="ticket_description" required placeholder="<?php _e('Beschreiben Sie Ihr Anliegen', 'wp-multi-toolkit'); ?>"></textarea>
|
||||
<label for="ticket_description">Ticket-Beschreibung</label>
|
||||
<textarea name="ticket_description" id="ticket_description" required placeholder="Beschreiben Sie Ihr Anliegen"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="ticket_label"><?php _e('Kategorie', 'wp-multi-toolkit'); ?></label>
|
||||
<label for="ticket_label">Kategorie</label>
|
||||
<select name="ticket_label" id="ticket_label" required>
|
||||
<option value="bug"><?php _e('Bug (Etwas funktioniert nicht)', 'wp-multi-toolkit'); ?></option>
|
||||
<option value="enhancement"><?php _e('Verbesserung (Neue Funktion)', 'wp-multi-toolkit'); ?></option>
|
||||
<option value="question"><?php _e('Frage (Mehr Infos benötigt)', 'wp-multi-toolkit'); ?></option>
|
||||
<option value="help wanted"><?php _e('Hilfe benötigt', 'wp-multi-toolkit'); ?></option>
|
||||
<option value="invalid"><?php _e('Ungültig (Etwas ist falsch)', 'wp-multi-toolkit'); ?></option>
|
||||
<option value="duplicate"><?php _e('Duplikat (Bereits vorhanden)', 'wp-multi-toolkit'); ?></option>
|
||||
<option value="wontfix"><?php _e('Wird nicht behoben', 'wp-multi-toolkit'); ?></option>
|
||||
<option value="bug">Bug (Etwas funktioniert nicht)</option>
|
||||
<option value="enhancement">Verbesserung (Neue Funktion)</option>
|
||||
<option value="question">Frage (Mehr Infos benötigt)</option>
|
||||
<option value="help wanted">Hilfe benötigt</option>
|
||||
<option value="invalid">Ungültig (Etwas ist falsch)</option>
|
||||
<option value="duplicate">Duplikat (Bereits vorhanden)</option>
|
||||
<option value="wontfix">Wird nicht behoben</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<input type="submit" name="submit_ticket" value="<?php _e('Ticket absenden', 'wp-multi-toolkit'); ?>" class="submit-button" />
|
||||
<input type="submit" name="submit_ticket" value="Ticket absenden" class="submit-button" />
|
||||
</form>
|
||||
|
||||
<?php
|
||||
@ -183,6 +116,7 @@ function support_ticket_form() {
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// CSS nur auf der Ticket-Seite (wp_multi_support) ausgeben
|
||||
if (isset($_GET['page']) && $_GET['page'] === 'wp_multi_support') {
|
||||
?>
|
||||
<style>
|
||||
@ -264,244 +198,27 @@ function support_ticket_form() {
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
|
||||
// Menüseite hinzufügen
|
||||
function add_support_ticket_page() {
|
||||
add_menu_page(
|
||||
__('WP-Multi Support', 'wp-multi-toolkit'),
|
||||
__('WP-Multi Support', 'wp-multi-toolkit'),
|
||||
'manage_options',
|
||||
'wp_multi_support',
|
||||
'support_ticket_form'
|
||||
'WP-Multi Support', // Seitentitel
|
||||
'WP-Multi Support', // Menüname
|
||||
'manage_options', // Berechtigung
|
||||
'wp_multi_support', // Slug (angepasst für Konsistenz)
|
||||
'support_ticket_form' // Funktion, die das Formular rendert
|
||||
);
|
||||
}
|
||||
|
||||
add_action('admin_menu', 'add_support_ticket_page');
|
||||
|
||||
/*
|
||||
* Virtueller Assistent als Submenü
|
||||
*/
|
||||
function wpmt_virtual_assistant_page() {
|
||||
if (!current_user_can('manage_options')) {
|
||||
wp_die(__('Du hast nicht die Berechtigung, auf diese Seite zuzugreifen.', 'wp-multi-toolkit'));
|
||||
}
|
||||
// ### Update Funktion ###
|
||||
*/
|
||||
|
||||
$assistant_responses = apply_filters('wpmt_assistant_responses', array(
|
||||
'default' => __('Entschuldigung, das verstehe ich nicht. Versuche es mit einer anderen Frage oder erstelle ein Support-Ticket unter WP-Multi Support!', 'wp-multi-toolkit')
|
||||
));
|
||||
|
||||
// Stichwörter aus den Antworten extrahieren (ohne 'default')
|
||||
$keywords = array_keys($assistant_responses);
|
||||
unset($keywords[array_search('default', $keywords)]); // Entfernt 'default' aus der Liste
|
||||
$keywords_list = implode(', ', $keywords);
|
||||
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h1><?php _e('WP Multi Virtueller Assistent', 'wp-multi-toolkit'); ?></h1>
|
||||
<div class="wpmt-assistant-container" style="background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); max-width: 600px; margin: 0 auto 20px;">
|
||||
<img src="https://m-viper.de/img/bot.png" alt="<?php _e('Virtueller Assistent', 'wp-multi-toolkit'); ?>" style="max-width: 100px; display: block; margin: 0 auto 20px;">
|
||||
<p><?php _e('Stelle mir eine Frage zu WP Multi Plugins!', 'wp-multi-toolkit'); ?></p>
|
||||
<input type="text" id="assistant-input" style="width: 100%; padding: 10px; margin-bottom: 10px;" placeholder="<?php _e('z. B. Wie aktiviere ich Telegram?', 'wp-multi-toolkit'); ?>" />
|
||||
<button id="assistant-submit" class="button button-primary"><?php _e('Frage stellen', 'wp-multi-toolkit'); ?></button>
|
||||
<div id="assistant-response" style="margin-top: 20px; padding: 10px; border: 1px solid #ddd; min-height: 50px;"></div>
|
||||
</div>
|
||||
<div class="wpmt-keywords-container" style="background: #f9f9f9; padding: 15px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); max-width: 600px; margin: 0 auto;">
|
||||
<h3 style="margin-top: 0; font-size: 16px;"><?php _e('Verfügbare Stichwörter', 'wp-multi-toolkit'); ?></h3>
|
||||
<p style="font-size: 12px; color: #666;"><?php echo esc_html($keywords_list); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
// Funktion zum Senden der Frage
|
||||
function submitQuestion() {
|
||||
var question = $('#assistant-input').val().toLowerCase();
|
||||
var responses = <?php echo json_encode($assistant_responses); ?>;
|
||||
var response = responses['default'];
|
||||
|
||||
for (var key in responses) {
|
||||
if (question.includes(key)) {
|
||||
response = responses[key];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$('#assistant-response').html(response);
|
||||
$('#assistant-input').val(''); // Eingabefeld nach dem Senden leeren
|
||||
}
|
||||
|
||||
// Button-Klick-Event
|
||||
$('#assistant-submit').on('click', function() {
|
||||
submitQuestion();
|
||||
});
|
||||
|
||||
// Enter-Taste-Event
|
||||
$('#assistant-input').on('keypress', function(e) {
|
||||
if (e.which === 13) { // 13 ist der Keycode für Enter
|
||||
e.preventDefault(); // Verhindert Standard-Formularverhalten
|
||||
submitQuestion();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.wpmt-assistant-container {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||
max-width: 600px;
|
||||
margin: 0 auto 20px;
|
||||
text-align: center;
|
||||
}
|
||||
#assistant-input {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
font-size: 14px;
|
||||
}
|
||||
#assistant-submit {
|
||||
background-color: #0073aa;
|
||||
color: #fff;
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
#assistant-submit:hover {
|
||||
background-color: #005d82;
|
||||
}
|
||||
.wpmt-keywords-container {
|
||||
background: #f9f9f9;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
text-align: left;
|
||||
}
|
||||
.wpmt-keywords-container h3 {
|
||||
margin-top: 0;
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
}
|
||||
.wpmt-keywords-container p {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
|
||||
function wpmt_add_assistant_page() {
|
||||
add_submenu_page(
|
||||
'wp_multi_support',
|
||||
__('Virtueller Assistent', 'wp-multi-toolkit'),
|
||||
__('Virtueller Assistent', 'wp-multi-toolkit'),
|
||||
'manage_options',
|
||||
'wpmt_assistant',
|
||||
'wpmt_virtual_assistant_page'
|
||||
);
|
||||
}
|
||||
add_action('admin_menu', 'wpmt_add_assistant_page');
|
||||
|
||||
/*
|
||||
* Antworten vordefinieren
|
||||
*/
|
||||
add_filter('wpmt_assistant_responses', function($responses) {
|
||||
// WP Multi
|
||||
$responses['statistik'] = __('Nutze den Shortcode [statistik_manager] oder gehe zu "WP Stat & Notice", um Statistiken wie Beitragsanzahl, Kommentare, Kategorien und Serien anzuzeigen.', 'wp-multi-toolkit');
|
||||
$responses['telegram'] = __('Schickt Benachrichtigungen für neue Beiträge an Telegram. Konfiguriere dies unter "Notify > TG-Notify".', 'wp-multi-toolkit');
|
||||
$responses['discord'] = __('Schickt Benachrichtigungen für neue Beiträge an Discord. Konfiguriere dies unter "Notify > DC-Notify".', 'wp-multi-toolkit');
|
||||
$responses['admin links'] = __('Füge eigene Links (z. B. zu externen Seiten) im Adminpanel hinzu. Gehe zu "Werkzeuge > Admin-Link hinzufügen".', 'wp-multi-toolkit');
|
||||
$responses['gast-autor'] = __('Gib Gastautoren unter "Benutzer > Gastautor (Übersicht)" ein. Sie werden in jedem Beitrag im Frontend angezeigt.', 'wp-multi-toolkit');
|
||||
$responses['beitrag report'] = __('Unangemessene Beiträge melden und bearbeiten. Sieh die Liste unter "Gemeldete Beiträge".', 'wp-multi-toolkit');
|
||||
$responses['textbox'] = __('Fügt eine Textbox mit vordefinierten Texten am Beitragsende hinzu. Texte können im Adminpanel hinterlegt werden.', 'wp-multi-toolkit');
|
||||
$responses['banner'] = __('Stelle ein Informationsbanner unter "WP Stat & Notice" ein (Header oder Footer).', 'wp-multi-toolkit');
|
||||
$responses['inhaltsverzeichnis'] = __('Nutze den Shortcode [alphabetical_index], um ein Inhaltsverzeichnis aller Beiträge zu erstellen.', 'wp-multi-toolkit');
|
||||
$responses['lesezeichen'] = __('Gäste können Lesezeichen mit [add_bookmark] setzen und mit [display_bookmarks] anzeigen. Per Cookie gespeichert.', 'wp-multi-toolkit');
|
||||
$responses['custom shortcode'] = __('Erstelle eigene Shortcodes und wähle sie unter "Beitrag erstellen" im Editor aus.', 'wp-multi-toolkit');
|
||||
$responses['kommentar sperren'] = __('Sperre Benutzer für Kommentare unter "Benutzer sperren" (z. B. via Benutzername, IP, Mail).', 'wp-multi-toolkit');
|
||||
$responses['filter'] = __('Verbiete Rufnummern, Mailadressen, URLs, IPs oder Schimpfwörter unter "Kommentare > Kommentar Filter". Verstöße werden mit * ersetzt.', 'wp-multi-toolkit');
|
||||
$responses['analytics'] = __('Sieh die beliebtesten Beiträge (Views, Kommentare, Titel, ID, Zeitstempel) unter "Benutzer > Benutzer Analytics".', 'wp-multi-toolkit');
|
||||
$responses['pinwand'] = __('Hinterlege Nachrichten für Backend-Nutzer unter "Pinnwand". Diese können erstellt, bearbeitet oder gelöscht werden.', 'wp-multi-toolkit');
|
||||
$responses['brute force'] = __('Schutz vor Brute-Force: Loggt Fehlversuche und sperrt nach 5 Versuchen. Einstellungen unter "Sicherheit".', 'wp-multi-toolkit');
|
||||
$responses['anti spam'] = __('Blockiert Spam und Bots. Konfiguriere dies unter "Sicherheit" mit Übersicht im Adminpanel.', 'wp-multi-toolkit');
|
||||
$responses['auto tag'] = __('Fügt fehlende Tags automatisch hinzu. Verwalte verbotene Wörter unter "Beiträge > Automatische Tags".', 'wp-multi-toolkit');
|
||||
$responses['login deaktivieren'] = __('Deaktiviere Logins im Profil unter "Benutzer > Alle Benutzer > Benutzer auswählen".', 'wp-multi-toolkit');
|
||||
$responses['text copy'] = __('Schützt Texte vor Kopieren (Rechtsklick-Sperre). Aktiviere dies in den WP Multi-Einstellungen.', 'wp-multi-toolkit');
|
||||
$responses['trash mail'] = __('Verbietet Trash-Mail-Adressen in Kommentaren. Die Liste wird vom Entwickler gepflegt.', 'wp-multi-toolkit');
|
||||
|
||||
// WP Multi Comment Notifications
|
||||
$responses['kommentar benachrichtigung'] = __('Schickt Benachrichtigungen für neue Kommentare per Mail, Telegram oder Discord. Einstellungen unter "Kommentare > Kommentar Benachrichtigung".', 'wp-multi-toolkit');
|
||||
|
||||
// WP Multi Kategorie
|
||||
$responses['kategorien ausblenden'] = __('Blende einzelne Kategorien unter "Beiträge > Kategorie Filter" aus.', 'wp-multi-toolkit');
|
||||
|
||||
// WP Multi Search
|
||||
$responses['suchfunktion'] = __('Füge eine Suchfunktion (Allgemein, Gastautor, Titel) als Shortcode, Widget oder Menüeintrag hinzu. Einstellungen unter "Einstellung > WP-Multi Search".', 'wp-multi-toolkit');
|
||||
|
||||
// WP Multi Toolkit
|
||||
$responses['update management'] = __('Zeigt den Status der WP Multi Plugins und verfügbare Updates im Dashboard-Widget "Verfügbare Updates für WP Multi Toolkit".', 'wp-multi-toolkit');
|
||||
$responses['support issues'] = __('Erstelle Support-Tickets unter "WP-Multi Support" für Antworten zu WP Multi Plugins.', 'wp-multi-toolkit');
|
||||
$responses['dokumentation'] = __('Finde die Dokumentation unter "WP-Multi Support > Dokumentation" mit Links zu den Plugins.', 'wp-multi-toolkit');
|
||||
$responses['virtueller assistent'] = __('Ich bin der virtuelle Assistent! Stelle mir Fragen zu WP Multi Plugins unter "WP-Multi Support > Virtueller Assistent".', 'wp-multi-toolkit');
|
||||
$responses['toolbar'] = __('Die Schnellstart-Toolbar unten rechts bietet Zugriff auf Support, Updates, Dokumentation und mich!', 'wp-multi-toolkit');
|
||||
$responses['wp multi plugins'] = __('Folgende Plugins gehören zur WP Multi-Reihe: <br> - <strong>WP Multi Toolkit</strong>: Schnittstelle für alle WP Multi Plugins.<br> - <strong>WP Multi</strong>: Hauptplugin mit vielen Funktionen.<br> - <strong>WP Multi Comment Notifications</strong>: Benachrichtigungen für Kommentare.<br> - <strong>WP Multi Search</strong>: Erweiterte Suchfunktion.<br> - <strong>WP Multi Kategorie</strong>: Kategoriefilter.', 'wp-multi-toolkit');
|
||||
|
||||
// Allgemeine Fragen und Antworten zu WP Multi Plugins
|
||||
$responses['was sind wp multi plugins'] = __('Die WP Multi Plugins sind eine Sammlung von WordPress-Plugins, die erweiterte Funktionen für deine Website bieten. Dazu gehören Tools für Benachrichtigungen, Sicherheit, Statistiken, Kommentar-Management und mehr. Sieh dir die Liste unter "wp multi plugins" an!', 'wp-multi-toolkit');
|
||||
$responses['wie installiere ich ein plugin'] = __('Gehe zu "Plugins > Neu hinzufügen" in deinem WordPress-Dashboard, lade die Plugin-Datei (z. B. von https://git.viper.ipv64.net/M_Viper) hoch und aktiviere es. Alternativ kannst du es manuell über FTP in den Ordner /wp-content/plugins/ hochladen und aktivieren.', 'wp-multi-toolkit');
|
||||
$responses['wo finde ich updates'] = __('Updates für WP Multi Plugins findest du im Dashboard-Widget "Verfügbare Updates für WP Multi Toolkit" oder auf https://git.viper.ipv64.net/M_Viper. Lade die neueste Version herunter und aktualisiere das Plugin manuell.', 'wp-multi-toolkit');
|
||||
$responses['wie erstelle ich ein support ticket'] = __('Gehe zu "WP-Multi Support" im Admin-Menü, wähle das Plugin, gib einen Titel und eine Beschreibung ein und sende das Ticket ab. Du erhältst eine Bestätigung, wenn es erfolgreich erstellt wurde.', 'wp-multi-toolkit');
|
||||
$responses['welche voraussetzungen gibt es'] = __('Die WP Multi Plugins benötigen mindestens WordPress 6.7.2. Einige Funktionen (z. B. Telegram- oder Discord-Benachrichtigungen) erfordern API-Keys oder zusätzliche Konfiguration. Details findest du in der Dokumentation.', 'wp-multi-toolkit');
|
||||
$responses['sind die plugins kostenlos'] = __('Ja, alle WP Multi Plugins sind kostenlos verfügbar unter https://git.viper.ipv64.net/M_Viper. Es gibt keine versteckten Kosten und es wird kein Geld angenommen.', 'wp-multi-toolkit');
|
||||
$responses['wie deaktiviere ich ein plugin'] = __('Gehe zu "Plugins > Installierte Plugins" in deinem WordPress-Dashboard, suche das Plugin und klicke auf "Deaktivieren". Du kannst es danach löschen, wenn du es nicht mehr benötigst.', 'wp-multi-toolkit');
|
||||
$responses['wo finde ich die dokumentation'] = __('Die Dokumentation ist unter "WP-Multi Support > Dokumentation" im Admin-Menü verfügbar. Sie enthält Details zu jedem Plugin und Links zu den Download-Seiten.', 'wp-multi-toolkit');
|
||||
$responses['wer entwickelt die plugins'] = __('Die WP Multi Plugins werden von M_Viper entwickelt. Mehr Infos findest du auf https://m-viper.de oder im Repository https://git.viper.ipv64.net/M_Viper.', 'wp-multi-toolkit');
|
||||
$responses['kann ich eigene funktionen hinzufügen'] = __('Ja, die Plugins sind Open Source. Du kannst den Code auf https://git.viper.ipv64.net/M_Viper anpassen. Für Vorschläge erstelle ein Support-Ticket mit der Kategorie "Verbesserung".', 'wp-multi-toolkit');
|
||||
|
||||
return $responses;
|
||||
});
|
||||
|
||||
/*
|
||||
* Schnellzugriff-Menü (Floating Toolbar)
|
||||
*/
|
||||
function wpmt_add_floating_toolbar() {
|
||||
if (!current_user_can('manage_options') || !is_admin()) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<div id="wpmt-floating-toolbar" style="position: fixed; bottom: 20px; right: 20px; z-index: 1000;">
|
||||
<button id="wpmt-toolbar-toggle" style="background: #0073aa; color: #fff; border: none; padding: 5px; border-radius: 50%; cursor: pointer; width: 40px; height: 40px; overflow: hidden;">
|
||||
<img src="https://m-viper.de/img/bot.png" alt="<?php _e('Toolbar öffnen/schließen', 'wp-multi-toolkit'); ?>" style="width: 100%; height: 100%; object-fit: cover;" id="toolbar-icon">
|
||||
</button>
|
||||
<div id="wpmt-toolbar-menu" style="display: none; position: absolute; bottom: 50px; right: 0; background: #fff; padding: 10px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.2);">
|
||||
<a href="<?php echo admin_url('admin.php?page=wp_multi_support'); ?>" class="button" style="display: block; margin: 5px 0;"><?php _e('Support-Ticket', 'wp-multi-toolkit'); ?></a>
|
||||
<a href="<?php echo admin_url('index.php'); ?>" class="button" style="display: block; margin: 5px 0;"><?php _e('Updates prüfen', 'wp-multi-toolkit'); ?></a>
|
||||
<a href="<?php echo admin_url('admin.php?page=wpmt_docs'); ?>" class="button" style="display: block; margin: 5px 0;"><?php _e('Dokumentation', 'wp-multi-toolkit'); ?></a>
|
||||
<a href="<?php echo admin_url('admin.php?page=wpmt_assistant'); ?>" class="button" style="display: block; margin: 5px 0;"><?php _e('Assistent', 'wp-multi-toolkit'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(document).ready(function($) {
|
||||
$('#wpmt-toolbar-toggle').on('click', function() {
|
||||
$('#wpmt-toolbar-menu').toggle();
|
||||
// Bild bleibt statisch, da nur ein Bild verwendet wird
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
add_action('admin_footer', 'wpmt_add_floating_toolbar');
|
||||
|
||||
/*
|
||||
* Update Funktion
|
||||
*/
|
||||
define('WPMT_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
||||
|
||||
// Textdomain laden
|
||||
@ -558,110 +275,6 @@ function wpmt_multi_shortcode($atts) {
|
||||
}
|
||||
add_shortcode('wpmt_multi', 'wpmt_multi_shortcode');
|
||||
|
||||
// ### Automatisierte Plugin-Dokumentation ###
|
||||
|
||||
// Funktion zur Generierung der Dokumentation
|
||||
function wpmt_generate_plugin_docs() {
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||
|
||||
$installed_plugins = get_plugins();
|
||||
$wp_multi_plugins = array(
|
||||
'wp-multi-toolkit' => array(
|
||||
'file' => 'wp-multi-toolkit/wp-multi-toolkit.php',
|
||||
'name' => 'WP Multi Toolkit',
|
||||
'description' => __('Zentrales Toolkit für die WP Multi Plugin-Reihe mit Update-Management und Support-Funktionen.', 'wp-multi-toolkit'),
|
||||
'repo' => 'wp-multi-toolkit'
|
||||
),
|
||||
'wp-multi' => array(
|
||||
'file' => 'WP-Multi/wp-multi.php',
|
||||
'name' => 'WP Multi',
|
||||
'description' => __('Hauptplugin für Multi-Funktionen mit Shortcode-Unterstützung.', 'wp-multi-toolkit'),
|
||||
'repo' => 'wp-multi'
|
||||
),
|
||||
'wp-multi-search' => array(
|
||||
'file' => 'wp-multi-search/wp-multi-search.php',
|
||||
'name' => 'WP Multi Search',
|
||||
'description' => __('Erweiterte Suchfunktionen für WordPress.', 'wp-multi-toolkit'),
|
||||
'repo' => 'WP-Multi-Search'
|
||||
),
|
||||
'wp-multi-comment-notifications' => array(
|
||||
'file' => 'wp-multi-comment-notifications/wp-multi-comment-notifications.php',
|
||||
'name' => 'WP Multi Comment Notifications',
|
||||
'description' => __('Automatische Benachrichtigungen für neue Kommentare.', 'wp-multi-toolkit'),
|
||||
'repo' => 'wp-multi-comment-notifications'
|
||||
),
|
||||
'wp-multi-kategorie' => array(
|
||||
'file' => 'wp-multi-kategorie/wp-multi-kategorie.php',
|
||||
'name' => 'WP Multi Kategorie',
|
||||
'repo' => 'wp-multi-kategorie'
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h1><?php echo esc_html__('WP Multi Plugin-Dokumentation', 'wp-multi-toolkit'); ?></h1>
|
||||
<p><?php echo esc_html__('Hier finden Sie eine Übersicht aller WP Multi Plugins, einschließlich Versionen und grundlegender Informationen.', 'wp-multi-toolkit'); ?></p>
|
||||
|
||||
<?php foreach ($wp_multi_plugins as $key => $plugin) : ?>
|
||||
<div class="wpmt-docs-section">
|
||||
<h2><?php echo esc_html($plugin['name']); ?></h2>
|
||||
<?php
|
||||
$is_installed = array_key_exists($plugin['file'], $installed_plugins);
|
||||
if ($is_installed) {
|
||||
$plugin_data = get_plugin_data(WP_PLUGIN_DIR . '/' . $plugin['file']);
|
||||
$is_active = is_plugin_active($plugin['file']);
|
||||
?>
|
||||
<p><strong><?php echo esc_html__('Status', 'wp-multi-toolkit'); ?>:</strong> <?php echo $is_active ? esc_html__('Aktiv', 'wp-multi-toolkit') : esc_html__('Inaktiv', 'wp-multi-toolkit'); ?></p>
|
||||
<p><strong><?php echo esc_html__('Version', 'wp-multi-toolkit'); ?>:</strong> <?php echo esc_html($plugin_data['Version']); ?></p>
|
||||
<p><strong><?php echo esc_html__('Beschreibung', 'wp-multi-toolkit'); ?>:</strong> <?php echo esc_html($plugin_data['Description']); ?></p>
|
||||
<p><strong><?php echo esc_html__('Plugin-URI', 'wp-multi-toolkit'); ?>:</strong> <a href="<?php echo esc_url($plugin_data['PluginURI']); ?>" target="_blank"><?php echo esc_url($plugin_data['PluginURI']); ?></a></p>
|
||||
<?php if (!empty($plugin_data['RequiresWP'])) : ?>
|
||||
<p><strong><?php echo esc_html__('Benötigt WordPress', 'wp-multi-toolkit'); ?>:</strong> <?php echo esc_html($plugin_data['RequiresWP']); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($plugin_data['TestedWP'])) : ?>
|
||||
<p><strong><?php echo esc_html__('Getestet bis WordPress', 'wp-multi-toolkit'); ?>:</strong> <?php echo esc_html($plugin_data['TestedWP']); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php } else { ?>
|
||||
<p><strong><?php echo esc_html__('Status', 'wp-multi-toolkit'); ?>:</strong> <?php echo esc_html__('Nicht installiert', 'wp-multi-toolkit'); ?></p>
|
||||
<p><strong><?php echo esc_html__('Beschreibung', 'wp-multi-toolkit'); ?>:</strong> <?php echo esc_html($plugin['description']); ?></p>
|
||||
<p><strong><?php echo esc_html__('Download', 'wp-multi-toolkit'); ?>:</strong> <a href="https://git.viper.ipv64.net/M_Viper/<?php echo esc_attr($plugin['repo']); ?>/releases" target="_blank"><?php echo esc_html__('Download-Seite', 'wp-multi-toolkit'); ?></a></p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.wpmt-docs-section {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||
}
|
||||
.wpmt-docs-section h2 {
|
||||
margin-top: 0;
|
||||
color: #23282d;
|
||||
}
|
||||
.wpmt-docs-section p {
|
||||
margin: 5px 0;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
|
||||
// Menüseite für Dokumentation hinzufügen
|
||||
function wpmt_add_docs_page() {
|
||||
add_submenu_page(
|
||||
'wp_multi_support',
|
||||
__('WP Multi Dokumentation', 'wp-multi-toolkit'),
|
||||
__('Dokumentation', 'wp-multi-toolkit'),
|
||||
'manage_options',
|
||||
'wpmt_docs',
|
||||
'wpmt_generate_plugin_docs'
|
||||
);
|
||||
}
|
||||
add_action('admin_menu', 'wpmt_add_docs_page');
|
||||
|
||||
// ### Update-Management ###
|
||||
|
||||
// Widget zum Admin-Dashboard hinzufügen
|
||||
@ -754,7 +367,7 @@ function wpmt_update_check() {
|
||||
$show_prereleases = get_option('wpmt_update_show_prereleases', false);
|
||||
$installed_plugins = get_plugins();
|
||||
$plugins_to_check = array(
|
||||
'wp-multi-toolkit' => 'wp-multi-toolkit/wp-multi-toolkit.php',
|
||||
'wp-multi-toolkit' => 'WP-Multi-Toolkit/wp-multi-toolkit.php',
|
||||
'wp-multi' => 'WP-Multi/wp-multi.php',
|
||||
'WP-Multi-Search' => 'wp-multi-search/wp-multi-search.php',
|
||||
'wp-multi-comment-notifications' => 'wp-multi-comment-notifications/wp-multi-comment-notifications.php'
|
||||
@ -787,7 +400,7 @@ function wpmt_check_update_server_status() {
|
||||
return !is_wp_error($response) && wp_remote_retrieve_response_code($response) == 200;
|
||||
}
|
||||
|
||||
// Callback-Funktion für das Widget
|
||||
// Callback-Funktion für das Widget mit nur Offline-Anzeige
|
||||
function wpmt_update_dashboard_widget_content() {
|
||||
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||
|
||||
@ -821,11 +434,6 @@ function wpmt_update_dashboard_widget_content() {
|
||||
'file' => 'wp-multi-comment-notifications/wp-multi-comment-notifications.php',
|
||||
'name' => 'WP Multi Comment Notifications',
|
||||
'repo' => 'wp-multi-comment-notifications'
|
||||
),
|
||||
'wp-multi-kategorie' => array(
|
||||
'file' => 'wp-multi-kategorie/wp-multi-kategorie.php',
|
||||
'name' => 'WP Multi Kategorie',
|
||||
'repo' => 'wp-multi-kategorie'
|
||||
)
|
||||
);
|
||||
|
||||
@ -927,11 +535,6 @@ function wpmt_update_dashboard_widget_content() {
|
||||
'file' => 'wp-multi-comment-notifications/wp-multi-comment-notifications.php',
|
||||
'download_url' => 'https://git.viper.ipv64.net/M_Viper/wp-multi-comment-notifications/releases',
|
||||
'description' => __('Kommentar-Benachrichtigungen.', 'wp-multi-toolkit')
|
||||
),
|
||||
'wp-multi-kategorie' => array(
|
||||
'file' => 'wp-multi-kategorie/wp-multi-kategorie.php',
|
||||
'download_url' => 'https://git.viper.ipv64.net/M_Viper/wp-multi-kategorie/releases',
|
||||
'description' => __('Erweiterte Kategorie-Funktionen für WP Multi.', 'wp-multi-toolkit')
|
||||
)
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user