Security: verwijder hardcoded wachtwoord, voeg random-wachtwoord-generator toe bij eerste installatie

This commit is contained in:
2026-08-27 08:57:05 +00:00
parent 6485f693dc
commit 74612aefbb
55 changed files with 6019 additions and 876 deletions
+70 -14
View File
@@ -1,33 +1,89 @@
<?php
/**
* Interface for plugin API objects.
* Both CMSAPI (front-end) and AdminPluginAPI (admin) implement this.
* Interface voor plugin-API-objecten.
*
* Zowel CMSAPI (front-end) als AdminPluginAPI (admin) implementeren deze interface.
*
* @since 2.6.4
*/
interface PluginAPIInterface
{
/**
* Haal een configuratiewaarde op via dot-notatie.
*
* @since 2.6.4
*
* @param string $key Configuratie-sleutel in dot-notatie (bijv. 'language.default').
* @param mixed $default Standaardwaarde indien de sleutel niet bestaat.
* @return mixed De gevonden waarde of $default indien niet gevonden.
*/
public function getConfig(string $key, $default = null);
/**
* Get the translations for a plugin in the current context.
* Haal de project-rootdirectory op (absoluut, genormaliseerd).
*
* System plugins resolve against the admin language; content plugins
* against the current content language. The implementation handles the
* fallback to the plugin's default_language.
* @since 2.6.4
*
* @param string $pluginName Plugin directory name
* @param string|null $lang Override language (optional)
* @return array Translations [key => value]
* @return string Absoluut pad naar de project-root.
*/
public function getProjectRoot(): string;
/**
* Haal het pad naar de contentdirectory op (absoluut, genormaliseerd).
*
* Bij een relatieve configuratiewaarde wordt deze afgezet tegen de project-root.
*
* @since 2.6.4
*
* @return string Absoluut pad naar de contentdirectory.
*/
public function getContentDir(): string;
/**
* Haal het pad naar de pluginsdirectory op (absoluut, genormaliseerd).
*
* @since 2.6.4
*
* @return string Absoluut pad naar de pluginsdirectory.
*/
public function getPluginsDir(): string;
/**
* Haal de versie-informatie uit version.php op als associatieve array.
*
* Bevat altijd minimaal de sleutel 'version'.
*
* @since 2.6.4
*
* @return array<string,mixed> Versie-informatie met minimaal de sleutel 'version'.
*/
public function getVersionInfo(): array;
/**
* Haal de vertalingen voor een plugin op in de huidige context.
*
* System-plugins resolven tegen de admin-taal; content-plugins tegen de
* huidige content-taal. De implementatie regelt de fallback naar de
* default_language van de plugin.
*
* @since 2.6.4
*
* @param string $pluginName Plugin-directorynaam.
* @param string|null $lang Optionele override-taal.
* @return array<string,string> Vertalingen als [key => value].
*/
public function getPluginTranslations(string $pluginName, ?string $lang = null): array;
/**
* Translate a single key for a plugin in the current context.
* Vertaal een enkele sleutel voor een plugin in de huidige context.
*
* @param string $key Translation key
* @param string $pluginName Plugin directory name
* @param string|null $lang Override language (optional)
* @return string Translated string, or $key if not found
* @since 2.6.4
*
* @param string $key Vertaalsleutel.
* @param string $pluginName Plugin-directorynaam.
* @param string|null $lang Optionele override-taal.
* @return string Vertaalde string, of $key indien niet gevonden.
*/
public function t(string $key, string $pluginName, ?string $lang = null): string;
}