v2.6.5 (Lyra): Dynamische pad-resolutie, WordPress-stijl docblocks, security-fix wachtwoord, git-historie schoon
- Bug: dashboard toonde 0 content (AdminPluginAPI::getContentDir() gaf relatief pad terug zonder normalisatie) - Dynamische pad-resolutie: PluginAPIInterface uitgebreid met getProjectRoot/getContentDir/getPluginsDir/getVersionInfo; CMSAPI en AdminPluginAPI implementeren deze universeel - public/index.php media-serving gebruikt $config['content_dir'] i.p.v. hardcoded /content - Navigation en Logs plugins halen paden via de API i.p.v. hardcoded dirname(__DIR__) - WordPress-stijl docblocks toegevoegd voor alle classes, methods, properties en functies (~450 docblocks, @since 2.6.5) - Security: hardcoded plaintext-wachtwoord 'admin' verwijderd uit AdminAuth.php; bij eerste installatie wordt een cryptografisch veilig wachtwoord gegenereerd (random_bytes, 16 tekens) en eenmalig op het inlogscherm getoond - Security: git-geschiedenis schoongemaakt (admin.json, admin.json.example, admin-console/config/admin.json verwijderd uit alle commits; filter-branch over alle branches + tags, gc --prune --aggressive) - README.md, README.en.md, AGENTS.md bijgewerkt - Test-scripts bijgewerkt naar clean-URL structuur + actuele ARIA-waarden - Versie verhoogd naar 2.6.5 - Tests: pentest 29/29, WCAG 25/25, functioneel 16/16, enhanced 25/25
This commit is contained in:
@@ -6,14 +6,14 @@
|
||||
* Registreert geaggregeerde bezoekersstatistieken (views, uniques, landen,
|
||||
* referrers, bots) in een JSON-bestand met file locking en retentie-cleanup.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
class Analytics
|
||||
{
|
||||
/**
|
||||
* Pad naar het JSON-statistiekbestand.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string Pad naar stats.json.
|
||||
*/
|
||||
private string $statsFile;
|
||||
@@ -21,7 +21,7 @@ class Analytics
|
||||
/**
|
||||
* Analytics configuratie-array.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var array<string,mixed> Analytics configuratie.
|
||||
*/
|
||||
private array $config;
|
||||
@@ -32,7 +32,7 @@ class Analytics
|
||||
* Stelt het pad naar het statistiekbestand in en maakt de opslagmap aan
|
||||
* indien deze nog niet bestaat.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param array $analyticsConfig {
|
||||
* Optioneel. Analytics configuratie.
|
||||
@@ -58,7 +58,7 @@ class Analytics
|
||||
* een zout, aggregeert totals/countries/pages/referrers/days/uniques, past
|
||||
* de retentie toe en schrijft atomair (met bestandslock) naar stats.json.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $page Page key van de bezochte pagina.
|
||||
* @param string $ip Client IP-adres.
|
||||
@@ -191,7 +191,7 @@ class Analytics
|
||||
* een daily chart. Bij $days = 0 wordt alles-tijd geretourneerd, anders
|
||||
* worden ontbrekende dagen in de range opgevuld voor een vloeiende grafiek.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param int $days Aantal dagen (bijv. 7, 30, 90), of 0 voor alles-tijd. Default 30.
|
||||
* @return array<string,mixed> Geaggregeerde statistieken met keys totals, countries, pages, referrers, daily_chart.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* User-Agent string, en genereert dynamische robots.txt-inhoud op basis
|
||||
* van de beveiligingsinstellingen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
class BotGuard
|
||||
{
|
||||
@@ -17,7 +17,7 @@ class BotGuard
|
||||
* Retourneert een multi-dimensionale array met de categorieën 'ai',
|
||||
* 'search' en 'scraper', elk met een mapping van patroon naar weergavelabel.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return array<string,array<string,string>> Bot-handtekeningen per categorie.
|
||||
*/
|
||||
@@ -81,7 +81,7 @@ class BotGuard
|
||||
* scraper), daarna met een generieke bot-regex. Bij geen match wordt de
|
||||
* bezoeker als mens beschouwd.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $ua User-Agent string.
|
||||
* @return array{category:string,pattern:string,label:string} Array met category, pattern en display label.
|
||||
@@ -129,7 +129,7 @@ class BotGuard
|
||||
* Controleert achtereenvolgens: lege User-Agent, custom blocklist, en
|
||||
* categorie-specifieke blokkades (ai, search, scraper, generic bot).
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $ua User-Agent string.
|
||||
* @param array $securitySettings Beveiligingsconfiguratie-array.
|
||||
@@ -187,7 +187,7 @@ class BotGuard
|
||||
* Stelt globale regels op voor zoekmachines en voegt, indien AI-bots
|
||||
* geblokkeerd worden, per AI-crawler een Disallow-blok toe.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param array $securitySettings Beveiligingsconfiguratie-array.
|
||||
* @return string Robots.txt-inhoud.
|
||||
|
||||
+15
-15
@@ -7,13 +7,13 @@
|
||||
* Implementaties hoeven alleen lezen, schrijven, verwijderen en controleren
|
||||
* van waarden op basis van een sleutel te ondersteunen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
interface CacheInterface {
|
||||
/**
|
||||
* Haal een waarde uit de cache op basis van de sleutel.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $key Sleutel van de cache-waarde.
|
||||
* @return mixed De gecachte waarde, of null wanneer deze ontbreekt of verlopen is.
|
||||
@@ -23,7 +23,7 @@ interface CacheInterface {
|
||||
/**
|
||||
* Sla een waarde op in de cache met een time-to-live.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $key Sleutel waaronder de waarde wordt opgeslagen.
|
||||
* @param mixed $value Te cachen waarde.
|
||||
@@ -35,7 +35,7 @@ interface CacheInterface {
|
||||
/**
|
||||
* Verwijder een waarde uit de cache.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $key Sleutel die verwijderd moet worden.
|
||||
* @return bool True bij succes of wanneer de sleutel niet bestond.
|
||||
@@ -45,7 +45,7 @@ interface CacheInterface {
|
||||
/**
|
||||
* Wis alle waarden uit de cache.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return bool True bij succes.
|
||||
*/
|
||||
@@ -54,7 +54,7 @@ interface CacheInterface {
|
||||
/**
|
||||
* Controleer of een sleutel bestaat en nog niet verlopen is.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $key Sleutel die gecontroleerd moet worden.
|
||||
* @return bool True wanneer de sleutel bestaat en geldig is.
|
||||
@@ -70,13 +70,13 @@ interface CacheInterface {
|
||||
* sleutels veilig als bestandsnaam gebruikt kunnen worden. Verlopen bestanden
|
||||
* worden bij lezen of controleren automatisch verwijderd.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
class FileCache implements CacheInterface {
|
||||
/**
|
||||
* Map waar de cache-bestanden in worden opgeslagen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
private string $cacheDir;
|
||||
@@ -84,7 +84,7 @@ class FileCache implements CacheInterface {
|
||||
/**
|
||||
* Maak een nieuwe file-cache aan en zorg dat de cachemap bestaat.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $cacheDir Pad naar de cachemap. Default '/tmp/codepress_cache'.
|
||||
*/
|
||||
@@ -101,7 +101,7 @@ class FileCache implements CacheInterface {
|
||||
* Wanneer het cache-bestand niet bestaat of verlopen is wordt null
|
||||
* teruggegeven; in het laatste geval wordt het bestand direct verwijderd.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $key Sleutel van de op te halen waarde.
|
||||
* @return mixed De gecachte waarde of null.
|
||||
@@ -124,7 +124,7 @@ class FileCache implements CacheInterface {
|
||||
/**
|
||||
* Sla een waarde op in de cache met de opgegeven TTL.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $key Sleutel waaronder wordt opgeslagen.
|
||||
* @param mixed $value Te cachen waarde.
|
||||
@@ -147,7 +147,7 @@ class FileCache implements CacheInterface {
|
||||
* Geeft true terug wanneer het bestand niet (meer) bestaat, zodat de
|
||||
* aanroeper dit niet zelf hoeft te controleren.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $key Sleutel die verwijderd moet worden.
|
||||
* @return bool True bij succes of wanneer de sleutel niet bestond.
|
||||
@@ -165,7 +165,7 @@ class FileCache implements CacheInterface {
|
||||
*
|
||||
* Submappen worden niet verwijderd, alleen losse bestanden.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return bool True bij succes.
|
||||
*/
|
||||
@@ -185,7 +185,7 @@ class FileCache implements CacheInterface {
|
||||
* Let op: verlopen bestanden worden hier niet automatisch verwijderd;
|
||||
* controleer vooraf eventueel via get() indien opruiming gewenst is.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $key Sleutel die gecontroleerd moet worden.
|
||||
* @return bool True wanneer de sleutel bestaat en de TTL nog niet verlopen is.
|
||||
@@ -206,7 +206,7 @@ class FileCache implements CacheInterface {
|
||||
* De sleutel wordt gehashed met md5 zodat deze veilig als bestandsnaam
|
||||
* gebruikt kan worden, ongeacht de lengte of tekenset van de sleutel.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $key Cache-sleutel.
|
||||
* @return string Volledig pad naar het cache-bestand.
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
* Bootstrap 5 styling, file-based organisatie, SEO-vriendelijke URLs en
|
||||
* responsive design.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
class CodePressCMS {
|
||||
/**
|
||||
* Configuratie-array met alle site-instellingen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var array
|
||||
*/
|
||||
public $config;
|
||||
@@ -25,7 +25,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Actieve taalcode van het huidige verzoek (bijv. 'nl' of 'en').
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
public $currentLanguage;
|
||||
@@ -33,7 +33,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Resultaten van de laatst uitgevoerde zoekopdracht.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var array
|
||||
*/
|
||||
public $searchResults = [];
|
||||
@@ -41,7 +41,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Opgebouwde menu-structuur vanuit de content-directory.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var array
|
||||
*/
|
||||
private $menu = [];
|
||||
@@ -51,7 +51,7 @@ class CodePressCMS {
|
||||
*
|
||||
* Wordt lazy geinitialiseerd in getEffectiveDefaultPage().
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string|null
|
||||
*/
|
||||
private ?string $effectiveDefaultPage = null;
|
||||
@@ -59,7 +59,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Geladen vertalingen voor de actieve taal.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var array
|
||||
*/
|
||||
private $translations = [];
|
||||
@@ -67,7 +67,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* PluginManager-instance die plugins en hooks beheert.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var PluginManager
|
||||
*/
|
||||
private $pluginManager;
|
||||
@@ -79,7 +79,7 @@ class CodePressCMS {
|
||||
* initialiseert de PluginManager en de CMSAPI, bouwt het menu op en
|
||||
* voert een eventuele zoekopdracht uit.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param array $config Configuration array containing site settings.
|
||||
* @return void
|
||||
@@ -114,7 +114,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Bouw een clean URL voor een pagina.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string|null $page Page path (e.g., 'blog/leren/artikel').
|
||||
* @param string|null $lang Language code.
|
||||
@@ -144,7 +144,7 @@ class CodePressCMS {
|
||||
* slash zijn. De punt blijft behouden zodat content-bestandsextensies
|
||||
* (md/php/html) in de URL overleven.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $page Page parameter.
|
||||
* @return string Gesanitizeerde pagina-parameter of 'invalid-page'.
|
||||
@@ -161,7 +161,7 @@ class CodePressCMS {
|
||||
*
|
||||
* Het resultaat wordt gecached in $effectiveDefaultPage.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string Page key that is served on the language root URL.
|
||||
*/
|
||||
@@ -181,7 +181,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Bouw een clean admin URL.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $route Admin route.
|
||||
* @param array $params Additional query parameters.
|
||||
@@ -198,7 +198,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Bouw een URL-string voor gebruik in templates (niet-statisch, met huidige taal-context).
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $page Pagina-pad.
|
||||
* @param array $extraParams Extra query parameters.
|
||||
@@ -211,7 +211,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Bepaal de actieve taal vanuit het verzoek of de configuratie.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string Current language code.
|
||||
*/
|
||||
@@ -227,7 +227,7 @@ class CodePressCMS {
|
||||
*
|
||||
* Elke taal is een subdirectory onder language/ met een site.php-bestand.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return array Available languages with their codes and names.
|
||||
*/
|
||||
@@ -267,7 +267,7 @@ class CodePressCMS {
|
||||
*
|
||||
* Valt terug op de standaardtaal en daarna op een lege array.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $lang Language code.
|
||||
* @return array Translations array.
|
||||
@@ -299,7 +299,7 @@ class CodePressCMS {
|
||||
*
|
||||
* Bevat een statische mapping van ISO-codes naar native taalnamen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $langCode Language code.
|
||||
* @return string Native language name.
|
||||
@@ -383,7 +383,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Geef vertaalde tekst voor een sleutel terug.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $key Translation key.
|
||||
* @return string Translated text, of de sleutel zelf indien geen vertaling gevonden.
|
||||
@@ -397,7 +397,7 @@ class CodePressCMS {
|
||||
*
|
||||
* Roept de plugin-actie 'onMenuBuild' aan na het scannen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @return void
|
||||
*/
|
||||
private function buildMenu() {
|
||||
@@ -408,7 +408,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Scan recursief een directory voor content-bestanden en mappen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $dir Directory path to scan.
|
||||
* @param string $prefix Relative path prefix.
|
||||
@@ -471,7 +471,7 @@ class CodePressCMS {
|
||||
* Reset de zoekresultaten, doorzoekt de content-directory en vuurt de
|
||||
* plugin-actie 'onSearch' af.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $query Search query string.
|
||||
* @return void
|
||||
@@ -485,7 +485,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Doorzoek recursief de bestanden in een directory naar de query.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $dir Directory to search in.
|
||||
* @param string $prefix Relative path prefix.
|
||||
@@ -524,7 +524,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Maak een zoeksnippet met de gevonden query.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $content Full content to create snippet from.
|
||||
* @param string $query Search query to highlight.
|
||||
@@ -546,7 +546,7 @@ class CodePressCMS {
|
||||
* Behandelt zoek-, guide-, welcome- en 404-verzoeken, path-traversal-
|
||||
* validatie, directory-listings en taal-specifieke bestandsversies.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @return array Page data with title and content.
|
||||
*/
|
||||
public function getPage() {
|
||||
@@ -662,7 +662,7 @@ class CodePressCMS {
|
||||
* type eerst geprobeerd, zodat /nl/test.php test.php serveert ook als
|
||||
* test.md bestaat.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $basePath Absolute path without extension.
|
||||
* @param string|null $preferredExt Optional extension to try first (md|php|html).
|
||||
@@ -693,7 +693,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Verzamel bestandsinformatie inclusief aanmaak- en wijzigingsdatums.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $filePath Path to the file.
|
||||
* @param array $metadata Optional frontmatter metadata.
|
||||
@@ -735,7 +735,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Format een bestandsgrootte in leesbare vorm (B, KB, MB, GB).
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param int $bytes File size in bytes.
|
||||
* @return string Formatted file size.
|
||||
@@ -754,7 +754,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Bouw de content voor de zoekresultatenpagina.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @return array Search results page data.
|
||||
*/
|
||||
private function getSearchResults() {
|
||||
@@ -787,7 +787,7 @@ class CodePressCMS {
|
||||
* Herkent een blok dat begint en eindigt met `---` en levert een array
|
||||
* met de metadata en de content zonder het meta-blok.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $content Raw content.
|
||||
* @return array Parsed metadata and content without meta block.
|
||||
@@ -830,7 +830,7 @@ class CodePressCMS {
|
||||
* Bevat de huidige HTTP_HOST (inclusief www-variant) en eventueel de
|
||||
* author-website host.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @return array List of host names.
|
||||
*/
|
||||
private function getInternalHosts(): array
|
||||
@@ -862,7 +862,7 @@ class CodePressCMS {
|
||||
*
|
||||
* Behandelt hostnames die zonder protocol zijn opgeslagen (bijv. "noorlander.info").
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $url Raw URL or hostname.
|
||||
* @return string Normalized absolute URL, or '' if empty.
|
||||
@@ -885,7 +885,7 @@ class CodePressCMS {
|
||||
* Trekt eerst frontmatter-metadata uit, bepaalt de titel en configureert
|
||||
* de CommonMark-omgeving met extensies en custom afbeeldingsgrootte-syntax.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $content Raw Markdown content.
|
||||
* @param string $actualFilePath Path to the source file (used for display name fallback).
|
||||
@@ -991,7 +991,7 @@ class CodePressCMS {
|
||||
* Bestaande `<a>`-tags, `<h1>`-inhoud en Markdown-links worden beschermd
|
||||
* tegen dubbele linking. De titel van de huidige pagina wordt overgeslagen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $content Content to process for auto-linking.
|
||||
* @param string $excludeTitle Title to exclude from auto-linking (current page title).
|
||||
@@ -1033,7 +1033,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Verzamel alle content-entries (mappen + bestanden) uit de content-directory.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return array List of entries: ['path' => ..., 'title' => ..., 'type' => ...].
|
||||
* type is 'md'/'php'/'html' voor bestanden, 'folder' voor mappen.
|
||||
@@ -1053,7 +1053,7 @@ class CodePressCMS {
|
||||
* zit in het pad), en mappen krijgen hun eigen entry zodat de boom zichtbaar
|
||||
* blijft.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $dir Directory to scan.
|
||||
* @param string $prefix Relative path prefix.
|
||||
@@ -1102,7 +1102,7 @@ class CodePressCMS {
|
||||
* content-extensies, zet streepjes/underscores om in spaties en past
|
||||
* special cases toe (bijv. 'ict' -> 'ICT').
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $filename Filename without extension.
|
||||
* @return string Formatted display name.
|
||||
@@ -1145,7 +1145,7 @@ class CodePressCMS {
|
||||
* Voor Markdown wordt het eerste H1 gebruikt, voor PHP een $title-
|
||||
* variabele en voor HTML de <title>- of <h1>-tag.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $filePath Path to the file.
|
||||
* @return string|null Extracted title or null if not found.
|
||||
@@ -1184,7 +1184,7 @@ class CodePressCMS {
|
||||
* geinclude bestand. Wanneer het bestand een string returnt wordt
|
||||
* die als content gebruikt in plaats van de gebufferde output.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $filePath Path to PHP file.
|
||||
* @return array Parsed content with title and body.
|
||||
@@ -1233,7 +1233,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Parse HTML-content en extraheer de titel.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $content Raw HTML content.
|
||||
* @param string $actualFilePath Path to the source file (used for display name fallback).
|
||||
@@ -1270,7 +1270,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Controleer of de content-directory leeg is.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return bool True if content directory is empty or doesn't exist.
|
||||
*/
|
||||
@@ -1297,7 +1297,7 @@ class CodePressCMS {
|
||||
* Toont een duidelijke "nieuwe installatie"-boodschap met vervolgstappen
|
||||
* wanneer de content-directory nog geen content-bestanden bevat.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @return array Welcome page data.
|
||||
*/
|
||||
private function getWelcomePage() {
|
||||
@@ -1344,7 +1344,7 @@ class CodePressCMS {
|
||||
* Valt terug op het Engelse equivalent indien de gevraagde taal niet
|
||||
* beschikbaar is. Bouwt tevens breadcrumbs op voor de handleiding.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @return array Guide page data.
|
||||
*/
|
||||
private function getGuidePage() {
|
||||
@@ -1418,7 +1418,7 @@ class CodePressCMS {
|
||||
* daarin. Leest eventuele layout/plugins-metadata uit een index.md in
|
||||
* dezelfde map.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $pagePath Relative path to directory.
|
||||
* @param string $dirPath Absolute path to directory.
|
||||
@@ -1524,7 +1524,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Geef de content van de 404-foutpagina.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @return array 404 page data.
|
||||
*/
|
||||
private function getError404() {
|
||||
@@ -1545,7 +1545,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Geef de opgebouwde menu-structuur terug.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @return array Menu structure for navigation.
|
||||
*/
|
||||
public function getMenu() {
|
||||
@@ -1559,7 +1559,7 @@ class CodePressCMS {
|
||||
* (menu, sidebar, breadcrumbs, SEO, theme-assets) en echoot de
|
||||
* gerenderde layout via ThemeManager.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @return void
|
||||
*/
|
||||
public function render() {
|
||||
@@ -1730,7 +1730,7 @@ class CodePressCMS {
|
||||
* Ondersteunt guide-pagina's, zoekpagina's en reguliere content-pagina's
|
||||
* met subdirectory's. Toont optioneel een sidebar-toggle-knop.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param bool $hasSidebar Whether sidebar content exists and should show toggle.
|
||||
* @param array|null $guidePage Guide page data (when on a guide page).
|
||||
@@ -1818,7 +1818,7 @@ class CodePressCMS {
|
||||
* Bestanden op root-niveau worden als tabs getoond; bestanden in mappen
|
||||
* als dropdown-items. Mappen zonder kinderen worden als uitgevinkt getoond.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param array $items Menu items to render.
|
||||
* @param int $level Current nesting level.
|
||||
@@ -1892,7 +1892,7 @@ class CodePressCMS {
|
||||
* waarden worden doorgegeven zodat ThemeManager kan terugvallen op
|
||||
* default_layout.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $layout Layout value from page metadata.
|
||||
* @return string Theme template key.
|
||||
@@ -1913,7 +1913,7 @@ class CodePressCMS {
|
||||
* Scant de content-directory naar het eerste .md/.php/.html-bestand
|
||||
* (met voorkeur voor bestanden zonder taal-prefix) en geeft de page-key terug.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string Detected page key, or 'index' as fallback.
|
||||
*/
|
||||
@@ -1943,7 +1943,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Detecteer de meest recent gewijzigde of aangemaakte pagina.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string Page key that was most recently modified or created.
|
||||
*/
|
||||
@@ -2022,7 +2022,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Geef de titel van de homepagina terug.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @return string Homepage title.
|
||||
*/
|
||||
private function getHomepageTitle() {
|
||||
@@ -2034,7 +2034,7 @@ class CodePressCMS {
|
||||
/**
|
||||
* Controleer of een map de actieve pagina bevat.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param array $children Array of child items.
|
||||
* @return bool True if active page is found in children.
|
||||
@@ -2065,7 +2065,7 @@ class CodePressCMS {
|
||||
* data:-/mailto:-URLs, fragment-URLs en clean taal-voorziene
|
||||
* pagina-routes blijven ongemoeid.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $content Content HTML to process.
|
||||
* @return string Verwerkte content met herschreven media-URLs.
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
* - Restore from an uploaded ZIP file
|
||||
* - Optional git-based versioning (init / commit / log / restore)
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
class ContentBackup
|
||||
{
|
||||
/**
|
||||
* Pad naar de content-map.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string Pad naar de content-map.
|
||||
*/
|
||||
private string $contentDir;
|
||||
@@ -23,7 +23,7 @@ class ContentBackup
|
||||
/**
|
||||
* Pad naar de project-root.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string Pad naar de project-root.
|
||||
*/
|
||||
private string $projectRoot;
|
||||
@@ -31,7 +31,7 @@ class ContentBackup
|
||||
/**
|
||||
* Of git beschikbaar is in de content-map.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var bool Of git beschikbaar is.
|
||||
*/
|
||||
private bool $gitAvailable;
|
||||
@@ -42,7 +42,7 @@ class ContentBackup
|
||||
* Stelt de content-map en project-root in en detecteert of git
|
||||
* beschikbaar is op het systeem.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $contentDir Pad naar de content-map.
|
||||
* @param string $projectRoot Optioneel. Pad naar de project-root. Default de map drie niveaus boven deze class.
|
||||
@@ -57,7 +57,7 @@ class ContentBackup
|
||||
/**
|
||||
* Controleer of git beschikbaar is en de content-map in een git-repo zit.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return bool True indien git beschikbaar is.
|
||||
*/
|
||||
@@ -72,7 +72,7 @@ class ContentBackup
|
||||
* Controleert of ZipArchive beschikbaar is en de content-map bestaat,
|
||||
* en voegt recursief alle bestanden en mappen toe aan het ZIP-archief.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $outputPath Pad waar het ZIP-bestand geschreven moet worden.
|
||||
* @return bool True bij succes, false bij falen.
|
||||
@@ -101,7 +101,7 @@ class ContentBackup
|
||||
* Pakt het ZIP-bestand uit in een tijdelijke map, maakt een backup van de
|
||||
* huidige content-map, kopieert de nieuwe content en ruimt oude backups op.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $zipPath Pad naar het geüploade ZIP-bestand.
|
||||
* @return array{success:bool,message:string} Resultaat-array met success en message.
|
||||
@@ -164,7 +164,7 @@ class ContentBackup
|
||||
* Voert `git init` uit en configureert een default identiteit (user.email
|
||||
* en user.name) zodat commits werken zonder globale git-config.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return array{success:bool,message:string} Resultaat-array met success en message.
|
||||
*/
|
||||
@@ -193,7 +193,7 @@ class ContentBackup
|
||||
* zijn via `git status --porcelain`, en commit met de opgegeven message.
|
||||
* Bij een lege message wordt een standaardmessage gegenereerd.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $message Commit message.
|
||||
* @return array{success:bool,message:string} Resultaat-array met success en message.
|
||||
@@ -236,7 +236,7 @@ class ContentBackup
|
||||
* Leest commits uit met `git log --pretty=format:%H|%h|%ai|%s` en parseert
|
||||
* deze naar een array met hash, short, date en message per commit.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param int $limit Maximum aantal entries. Default 20.
|
||||
* @return array{success:bool,commits:array<int,array{hash:string,short:string,date:string,message:string}>,message:string} Resultaat-array met success, commits en message.
|
||||
@@ -290,7 +290,7 @@ class ContentBackup
|
||||
* `git checkout <hash> -- .` uit om de bestanden van die commit
|
||||
* in de working tree te herstellen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $commitHash Commit-hash om naar te herstellen.
|
||||
* @return array{success:bool,message:string} Resultaat-array met success en message.
|
||||
@@ -322,7 +322,7 @@ class ContentBackup
|
||||
/**
|
||||
* Controleer of de content-map een git-repository bevat.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return bool True indien een .git-map aanwezig is.
|
||||
*/
|
||||
@@ -340,7 +340,7 @@ class ContentBackup
|
||||
*
|
||||
* Voert `git --version` uit en controleert de exit-code.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return bool True indien git uitvoerbaar is.
|
||||
*/
|
||||
@@ -356,7 +356,7 @@ class ContentBackup
|
||||
* Gebruikt proc_open met aparte pipes voor stdout, stderr en stdin.
|
||||
* Alle argumenten worden via escapeshellarg ge-escaped.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param array<int,string> $args Git-commando-argumenten.
|
||||
* @param string|null $cwd Optioneel. Werkdirectory voor het git-proces.
|
||||
@@ -400,7 +400,7 @@ class ContentBackup
|
||||
* Itereert over alle entries in $dir en voegt mappen (als lege dir) en
|
||||
* bestanden toe onder de opgegeven $prefix in het ZIP-archief.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param ZipArchive $zip ZIP-archief om aan toe te voegen.
|
||||
* @param string $dir Pad naar de bronmap.
|
||||
@@ -433,7 +433,7 @@ class ContentBackup
|
||||
* Maakt de doelmap aan indien nodig en kopieert alle bestanden en
|
||||
* submappen vanuit de bronmap.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $src Pad naar de bronmap.
|
||||
* @param string $dst Pad naar de doelmap.
|
||||
@@ -471,7 +471,7 @@ class ContentBackup
|
||||
*
|
||||
* Verwijdert eerst alle bestanden en submappen, daarna de map zelf.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $dir Pad naar de te verwijderen map.
|
||||
* @return void
|
||||
@@ -507,7 +507,7 @@ class ContentBackup
|
||||
* suffix, sorteert op wijzigingstijd (oudste eerst) en verwijdert alle
|
||||
* backups behalve de meest recente.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
+21
-21
@@ -8,14 +8,14 @@
|
||||
* bestand en een externe API. Providers vallen terug op de lokale database
|
||||
* wanneer een lookup geen resultaat oplevert.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
class GeoIP
|
||||
{
|
||||
/**
|
||||
* De analytics-configuratie uit config.json.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var array Bevat o.a. geoip_provider, geoip_mmdb_path en geoip_api_url.
|
||||
*/
|
||||
private array $config;
|
||||
@@ -23,7 +23,7 @@ class GeoIP
|
||||
/**
|
||||
* FileCache instantie voor het cachen van API-lookups.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var FileCache|null
|
||||
*/
|
||||
private ?FileCache $cache = null;
|
||||
@@ -31,7 +31,7 @@ class GeoIP
|
||||
/**
|
||||
* Initialiseert de GeoIP-provider met de analytics-configuratie.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param array $analyticsConfig De "analytics" sectie uit config.json. Default lege array.
|
||||
*/
|
||||
@@ -49,7 +49,7 @@ class GeoIP
|
||||
* gereserveerde ranges worden direct afgewezen. MMDB en API vallen
|
||||
* terug op de lokale database bij een mislukte lookup.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $ip IPv4- of IPv6-adres.
|
||||
* @return string|null Landcode in hoofdletters, of null bij onoplosbare/private adressen.
|
||||
@@ -91,7 +91,7 @@ class GeoIP
|
||||
* Geldige codes zijn exact twee letters. De codes ZZ en XX worden
|
||||
* beschouwd als onbekend en resulteren in null.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string|null $code Ruwe landcode uit een provider.
|
||||
* @return string|null Genormaliseerde landcode of null indien ongeldig/onbekend.
|
||||
@@ -112,7 +112,7 @@ class GeoIP
|
||||
* zoekopdracht uit op basis van het IP-adres. Ondersteunt zowel IPv4
|
||||
* (10-byte records) als IPv6 (34-byte records).
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $ip IPv4- of IPv6-adres.
|
||||
* @return string|null Landcode in hoofdletters of null indien niet gevonden.
|
||||
@@ -217,7 +217,7 @@ class GeoIP
|
||||
* het resultaat zeven dagen in een FileCache. De API-URL mag een
|
||||
* optionele API-key bevatten.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $ip IPv4- of IPv6-adres.
|
||||
* @return string|null Landcode of null indien de lookup faalt.
|
||||
@@ -256,7 +256,7 @@ class GeoIP
|
||||
* Opent een MMDB-bestand en extraheert de landcode via de ingebouwde
|
||||
* MMDBReader. Fouten worden gesilenced en resulteren in null.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $ip IPv4- of IPv6-adres.
|
||||
* @param string $filePath Pad naar het MMDB-bestand.
|
||||
@@ -276,7 +276,7 @@ class GeoIP
|
||||
/**
|
||||
* Zet een 2-letter ISO landcode om naar een regionale vlag-emoji.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string|null $code Landcode of null.
|
||||
* @return string Vlag-emoji of een wereldbol bij ongeldige invoer.
|
||||
@@ -301,7 +301,7 @@ class GeoIP
|
||||
* hun naam in de gevraagde taal. Onbekende codes worden ongewijzigd
|
||||
* teruggegeven.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string|null $code Landcode of null.
|
||||
* @param string $lang Gewenste taal, 'nl' of 'en'. Default 'nl'.
|
||||
@@ -364,14 +364,14 @@ class GeoIP
|
||||
* externe GeoIP2 dependency optioneel is. Ondersteunt 28-bit record sizes
|
||||
* en de veelvoorkomende datatypes (pointer, string, map, uint, bool).
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
class MMDBReader
|
||||
{
|
||||
/**
|
||||
* Pad naar het MMDB-bestand.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
private string $file;
|
||||
@@ -379,7 +379,7 @@ class MMDBReader
|
||||
/**
|
||||
* Bestandshandle voor het MMDB-bestand.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var resource|null
|
||||
*/
|
||||
private $handle;
|
||||
@@ -387,7 +387,7 @@ class MMDBReader
|
||||
/**
|
||||
* Metadata uit de MMDB-header.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var array Bevat o.a. node_count, record_size en ip_version.
|
||||
*/
|
||||
private array $meta;
|
||||
@@ -395,7 +395,7 @@ class MMDBReader
|
||||
/**
|
||||
* Opent het MMDB-bestand en laadt de metadata.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $file Pad naar het MMDB-bestand.
|
||||
* @throws \InvalidArgumentException Als het bestand niet bestaat.
|
||||
@@ -414,7 +414,7 @@ class MMDBReader
|
||||
/**
|
||||
* Sluit de bestandshandle bij het vernietigen van de instantie.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
public function __destruct()
|
||||
{
|
||||
@@ -428,7 +428,7 @@ class MMDBReader
|
||||
*
|
||||
* Zoekt naar de MaxMind marker en decodeert de daaropvolgende data.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @throws \RuntimeException Als de marker niet gevonden wordt.
|
||||
* @return void
|
||||
@@ -459,7 +459,7 @@ class MMDBReader
|
||||
* IP-adres. IPv4-adressen in een IPv6-boom worden correct afgehandeld
|
||||
* via de ipv4_instance_count metadata.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $ip IPv4- of IPv6-adres.
|
||||
* @return array|null Gedecodeerde datarecord of null indien niet gevonden.
|
||||
@@ -505,7 +505,7 @@ class MMDBReader
|
||||
*
|
||||
* Ondersteunt uitsluitend 28-bit record sizes.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param int $node Huidig node-index.
|
||||
* @param int $bit Bitwaarde (0 voor left, 1 voor right).
|
||||
@@ -536,7 +536,7 @@ class MMDBReader
|
||||
* return value bevat de gedecodeerde waarde en de cursorpositie na
|
||||
* het record.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param int $offset Start-offset in het bestand.
|
||||
* @return array Pair [mixed $value, int $newOffset].
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
* "logging.events" configuratiesectie (admin, requests, errors, security,
|
||||
* content, system).
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
class LogManager {
|
||||
/**
|
||||
* Event-type voor admin-acties.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
const EVENT_ADMIN = 'admin';
|
||||
@@ -29,7 +29,7 @@ class LogManager {
|
||||
/**
|
||||
* Event-type voor request-logging.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
const EVENT_REQUESTS = 'requests';
|
||||
@@ -37,7 +37,7 @@ class LogManager {
|
||||
/**
|
||||
* Event-type voor fouten en waarschuwingen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
const EVENT_ERRORS = 'errors';
|
||||
@@ -45,7 +45,7 @@ class LogManager {
|
||||
/**
|
||||
* Event-type voor beveiligingsgebeurtenissen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
const EVENT_SECURITY = 'security';
|
||||
@@ -53,7 +53,7 @@ class LogManager {
|
||||
/**
|
||||
* Event-type voor content-wijzigingen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
const EVENT_CONTENT = 'content';
|
||||
@@ -61,7 +61,7 @@ class LogManager {
|
||||
/**
|
||||
* Event-type voor systeemgebeurtenissen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
const EVENT_SYSTEM = 'system';
|
||||
@@ -69,7 +69,7 @@ class LogManager {
|
||||
/**
|
||||
* De "logging" configuratiesectie, of null indien niet geïnitialiseerd.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var array|null
|
||||
*/
|
||||
private static $config = null;
|
||||
@@ -77,7 +77,7 @@ class LogManager {
|
||||
/**
|
||||
* Lazy-initialized PDO-verbinding met de SQLite-database, of null.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var \PDO|null
|
||||
*/
|
||||
private static $pdo = null;
|
||||
@@ -85,7 +85,7 @@ class LogManager {
|
||||
/**
|
||||
* Pad naar het SQLite-databasebestand, of null indien niet geïnitialiseerd.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string|null
|
||||
*/
|
||||
private static $dbPath = null;
|
||||
@@ -96,7 +96,7 @@ class LogManager {
|
||||
* Slaat de configuratie op en stelt het pad naar de SQLite-database in
|
||||
* onder `admin/storage/logs`.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param array $loggingConfig De "logging" sectie uit config.json.
|
||||
* @return void
|
||||
@@ -110,7 +110,7 @@ class LogManager {
|
||||
/**
|
||||
* Geeft aan of logging in het algemeen ingeschakeld is.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return bool True indien logging ingeschakeld is, anders false.
|
||||
*/
|
||||
@@ -125,7 +125,7 @@ class LogManager {
|
||||
* Controleert eerst of logging in het algemeen ingeschakeld is en
|
||||
* daarna of het specifieke event aan staat in de configuratie.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $event Een van de EVENT_* constanten.
|
||||
* @return bool True indien het event geregistreerd moet worden.
|
||||
@@ -146,7 +146,7 @@ class LogManager {
|
||||
* Syslog is een aanvullende output en vervangt nooit de lokale
|
||||
* opslag, en komt dus nooit als driver terug.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string 'sqlite' of 'file'.
|
||||
*/
|
||||
@@ -169,7 +169,7 @@ class LogManager {
|
||||
* geconfigureerd is, wordt de entry tevens naar de remote syslog-server
|
||||
* gestuurd. Het IP-adres wordt uit de context of de RequestLogger gehaald.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $event Event-type (een EVENT_* constante).
|
||||
* @param string $level Loglevel (info, warning, error, debug).
|
||||
@@ -215,7 +215,7 @@ class LogManager {
|
||||
* Bouwt een syslog-bericht op met facility, severity en ident en stuurt
|
||||
* dit via een UDP-socket. Verbindings- en schrijffouten worden gesilenced.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param array $entry De te versturen log-entry.
|
||||
* @return void
|
||||
@@ -247,7 +247,7 @@ class LogManager {
|
||||
* niet beschikbaar is of het schrijven faalt, wordt teruggevallen op
|
||||
* de file-driver.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param array $entry De op te slaan log-entry.
|
||||
* @return void
|
||||
@@ -284,7 +284,7 @@ class LogManager {
|
||||
* Zorgt dat de doelmap bestaat en schrijft de entry met een vaste
|
||||
* opmaak. Schrijffouten worden gesilenced.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param array $entry De toe te voegen log-entry.
|
||||
* @return void
|
||||
@@ -308,7 +308,7 @@ class LogManager {
|
||||
* fout wordt de interne verbinding op null gezet en null teruggegeven,
|
||||
* zodat de aanroeper kan terugvallen op de file-driver.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return \PDO|null PDO-verbinding of null indien SQLite niet beschikbaar/faalt.
|
||||
*/
|
||||
@@ -352,7 +352,7 @@ class LogManager {
|
||||
/**
|
||||
* Geeft aan of de SQLite PDO-driver beschikbaar is.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return bool True indien PDO en de sqlite-driver beschikbaar zijn.
|
||||
*/
|
||||
@@ -368,7 +368,7 @@ class LogManager {
|
||||
* syslog, lpr, news, uucp, cron, authpriv, ftp) en local0 t/m local7.
|
||||
* Onbekende faciliteiten vallen terug op local0 (16).
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $facility Naam van de facility. Default 'local0' wordt door aanroeper gezet.
|
||||
* @return int Numerieke facility-waarde.
|
||||
@@ -391,7 +391,7 @@ class LogManager {
|
||||
* Ondersteunt debug t/m emergency. Onbekende levels vallen terug op
|
||||
* info (6). De invoer wordt case-insensitive vergeleken.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $level Loglevel (debug, info, notice, warning, error, ...).
|
||||
* @return int Numerieke severity-waarde (0 t/m 7).
|
||||
@@ -421,7 +421,7 @@ class LogManager {
|
||||
* Resultaten worden altijd nieuwste eerst geretourneerd (SQLite via
|
||||
* ORDER BY id DESC, file via array_reverse).
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param int $limit Aantal terug te geven entries. Default 200.
|
||||
* @param string|null $event Optioneel event-filter. Default null (geen filter).
|
||||
@@ -504,7 +504,7 @@ class LogManager {
|
||||
* Bij de file-driver wordt het logbestand leeggemaakt. Schrijffouten
|
||||
* worden gesilenced.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
+16
-16
@@ -6,14 +6,14 @@
|
||||
* Logregels worden naar een tekstbestand geschreven en, indien aanwezig,
|
||||
* tevens door de dynamische LogManager gerouteerd.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
|
||||
class Logger {
|
||||
/**
|
||||
* Loglevel voor debug-boodschappen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
const DEBUG = 'DEBUG';
|
||||
@@ -21,7 +21,7 @@ class Logger {
|
||||
/**
|
||||
* Loglevel voor informatieve boodschappen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
const INFO = 'INFO';
|
||||
@@ -29,7 +29,7 @@ class Logger {
|
||||
/**
|
||||
* Loglevel voor waarschuwingen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
const WARNING = 'WARNING';
|
||||
@@ -37,7 +37,7 @@ class Logger {
|
||||
/**
|
||||
* Loglevel voor fouten.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
const ERROR = 'ERROR';
|
||||
@@ -45,7 +45,7 @@ class Logger {
|
||||
/**
|
||||
* Pad naar het logbestand, of null indien nog niet geïnitialiseerd.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string|null
|
||||
*/
|
||||
private static $logFile = null;
|
||||
@@ -53,7 +53,7 @@ class Logger {
|
||||
/**
|
||||
* Of debug-logging actief is.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var bool
|
||||
*/
|
||||
private static $debugMode = false;
|
||||
@@ -65,7 +65,7 @@ class Logger {
|
||||
* map bestaat. Indien geen pad wordt opgegeven valt de logger terug
|
||||
* op een standaardpad onder de core-map.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string|null $logFile Pad naar het logbestand. Default null (standaardlocatie).
|
||||
* @param bool $debugMode Of debug-logging actief is. Default false.
|
||||
@@ -89,7 +89,7 @@ class Logger {
|
||||
/**
|
||||
* Logt een debug-boodschap (enkel in debug-modus).
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $message Boodschap die gelogd moet worden.
|
||||
* @param array $context Aanvullende contextuele data. Default lege array.
|
||||
@@ -104,7 +104,7 @@ class Logger {
|
||||
/**
|
||||
* Logt een informatieve boodschap.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $message Boodschap die gelogd moet worden.
|
||||
* @param array $context Aanvullende contextuele data. Default lege array.
|
||||
@@ -117,7 +117,7 @@ class Logger {
|
||||
/**
|
||||
* Logt een waarschuwing.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $message Boodschap die gelogd moet worden.
|
||||
* @param array $context Aanvullende contextuele data. Default lege array.
|
||||
@@ -130,7 +130,7 @@ class Logger {
|
||||
/**
|
||||
* Logt een fout.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $message Boodschap die gelogd moet worden.
|
||||
* @param array $context Aanvullende contextuele data. Default lege array.
|
||||
@@ -149,7 +149,7 @@ class Logger {
|
||||
* dynamische log gestuurd (errors/warnings naar EVENT_ERRORS, verder
|
||||
* naar EVENT_SYSTEM).
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $level Loglevel (DEBUG, INFO, WARNING, ERROR).
|
||||
* @param string $message Boodschap die gelogd moet worden.
|
||||
@@ -180,7 +180,7 @@ class Logger {
|
||||
/**
|
||||
* Geeft het pad naar het logbestand.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string|null Pad naar het logbestand of null indien niet geïnitialiseerd.
|
||||
*/
|
||||
@@ -191,7 +191,7 @@ class Logger {
|
||||
/**
|
||||
* Verwijdert het logbestand.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return bool True indien het bestand succesvol verwijderd is, anders false.
|
||||
*/
|
||||
@@ -209,7 +209,7 @@ class Logger {
|
||||
* nooit volledig in het geheugen geladen hoeven te worden. De regels
|
||||
* worden inclusief afsluitende newlines teruggegeven, oudste eerst.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param int $lines Aantal terug te halen regels. Default 100.
|
||||
* @return array<string> Logregels (oudste eerst) of lege array indien niet beschikbaar.
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
* buiten het venster en worden genegeerd. De teller wordt opgeslagen in een
|
||||
* CacheInterface-implementatie, standaard FileCache.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
class RateLimiter {
|
||||
/**
|
||||
* Maximum aantal toegestane pogingen binnen het tijdvenster.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var int
|
||||
*/
|
||||
private int $maxAttempts;
|
||||
@@ -22,7 +22,7 @@ class RateLimiter {
|
||||
/**
|
||||
* Lengte van het tijdvenster in seconden.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var int
|
||||
*/
|
||||
private int $timeWindow;
|
||||
@@ -30,7 +30,7 @@ class RateLimiter {
|
||||
/**
|
||||
* Cache-implementatie waarin de pogingen worden bijgehouden.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var CacheInterface
|
||||
*/
|
||||
private CacheInterface $cache;
|
||||
@@ -38,7 +38,7 @@ class RateLimiter {
|
||||
/**
|
||||
* Maak een nieuwe RateLimiter aan.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param int $maxAttempts Maximum aantal pogingen binnen het tijdvenster. Default 10.
|
||||
* @param int $timeWindow Lengte van het tijdvenster in seconden. Default 60.
|
||||
@@ -57,7 +57,7 @@ class RateLimiter {
|
||||
* aantal resterende pogingen onder het maximum ligt wordt de huidige
|
||||
* poging geregistreerd en true teruggegeven; anders false.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $identifier Unieke sleutel voor de te beperken actor (bijv. IP of gebruikersnaam).
|
||||
* @return bool True wanneer de poging is toegestaan, false wanneer het limiet is bereikt.
|
||||
@@ -89,7 +89,7 @@ class RateLimiter {
|
||||
* Telt alleen pogingen die binnen het tijdvenster vallen. Het resultaat
|
||||
* is nooit negatief.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $identifier Unieke sleutel voor de te beperken actor.
|
||||
* @return int Aantal resterende pogingen; minimaal 0.
|
||||
@@ -109,7 +109,7 @@ class RateLimiter {
|
||||
/**
|
||||
* Wis alle geregistreerde pogingen voor een identifier.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $identifier Unieke sleutel voor de te beperken actor.
|
||||
* @return void
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
* te matchen, het client-IP te bepalen en bezoekerstype (bot/mens/AI)
|
||||
* te detecteren.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
class RequestLogger
|
||||
{
|
||||
/**
|
||||
* Pad naar het logbestand.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
private string $logFile;
|
||||
@@ -23,7 +23,7 @@ class RequestLogger
|
||||
/**
|
||||
* Maak een nieuwe RequestLogger aan.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $logFile Pad naar het te gebruiken logbestand.
|
||||
*/
|
||||
@@ -40,7 +40,7 @@ class RequestLogger
|
||||
* deze exact twee tekens lang is. De mapstructuur wordt automatisch
|
||||
* aangemaakt indien deze nog niet bestaat.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $page Opgevraagde pagina of route.
|
||||
* @param string $ip Client IP-adres.
|
||||
@@ -74,7 +74,7 @@ class RequestLogger
|
||||
* alleen de eerste vier blokken behouden en de rest vervangen door '::x'.
|
||||
* Ongeldige adressen worden ongewijzigd teruggegeven.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $ip Het te anonimiseren IP-adres.
|
||||
* @return string Het geanonimiseerde IP-adres of het origineel bij een ongeldig adres.
|
||||
@@ -103,7 +103,7 @@ class RequestLogger
|
||||
* Bij een prefix-lengte van 0 komt ieder IP van dezelfde adresfamilie overeen.
|
||||
* Adresfamilies (IPv4 vs IPv6) worden niet onderling gemengd.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $ip Het te testen client IP-adres.
|
||||
* @param string[] $list Lijst van IP-adressen en/of CIDR-ranges.
|
||||
@@ -181,7 +181,7 @@ class RequestLogger
|
||||
* voorrang aan geldige publieke IP's en slaat interne/reserved ranges
|
||||
* over; de tweede pass is een fallback voor lokale ontwikkelomgevingen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string Het gedetecteerde client IP-adres, of '127.0.0.1' als fallback.
|
||||
*/
|
||||
@@ -242,7 +242,7 @@ class RequestLogger
|
||||
* ingelogde gebruiker wordt de naam aan het label toegevoegd. Zonder
|
||||
* BotGuard wordt een algemene bezoeker teruggegeven.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $ua De User-Agent string.
|
||||
* @param string $user Optionele gebruikersnaam; bij 'Gast' of leeg wordt geen naam toegevoegd. Default ''.
|
||||
@@ -293,7 +293,7 @@ class RequestLogger
|
||||
* en 'scraper' worden als bot beschouwd en als uppercase string
|
||||
* teruggegeven; anders null.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string|null Boticategorie ('AI', 'SEARCH' of 'SCRAPER') of null bij geen bot.
|
||||
*/
|
||||
@@ -318,7 +318,7 @@ class RequestLogger
|
||||
* is of een IP/cli-waarde bevat worden als gebruiker 'Gast' gemarkeerd.
|
||||
* Het resultaat is nieuwste-regel-eerst.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param int $lines Aantal te lezen regels vanaf het einde. Default 100.
|
||||
* @return array<int,array<string,mixed>> Geparseerde logregels, nieuwste eerst. Lege array bij ontbrekend bestand.
|
||||
|
||||
@@ -16,13 +16,13 @@ use Twig\Loader\FilesystemLoader;
|
||||
* fallback naar de default_layout van het thema wanneer de layout
|
||||
* onbekend is.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*/
|
||||
class ThemeManager {
|
||||
/**
|
||||
* Volledige CMS-configuratie.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var array Bevat o.a. 'theme_dir' en 'theme'.
|
||||
*/
|
||||
private $config;
|
||||
@@ -30,7 +30,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Absoluut pad naar de actieve thema-map.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var string
|
||||
*/
|
||||
private $themeDir;
|
||||
@@ -38,7 +38,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Ruwe theme.json configuratie-array.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var array
|
||||
*/
|
||||
private $themeConfig;
|
||||
@@ -46,7 +46,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Twig-omgeving voor het renderen van thema-templates.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
* @var Environment
|
||||
*/
|
||||
private $twig;
|
||||
@@ -58,7 +58,7 @@ class ThemeManager {
|
||||
* De Twig-cache staat uit en auto-escape is uitgeschakeld (de thema's
|
||||
* beheren eigen escaping waar nodig).
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param array $config Volledige CMS-configuratie; moet 'theme_dir' en 'theme' bevatten.
|
||||
*/
|
||||
@@ -77,7 +77,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Geeft het absolute pad van de actieve thema-map.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string Absoluut pad naar de thema-map.
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Geeft de ruwe theme.json configuratie-array.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return array Theme.json inhoud, of lege array bij afwezigheid.
|
||||
*/
|
||||
@@ -102,7 +102,7 @@ class ThemeManager {
|
||||
* Leest eerst 'title' uit theme.json, dan 'name', en als laatste
|
||||
* fallback de mapnaam van het thema.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string Thematische titel.
|
||||
*/
|
||||
@@ -115,7 +115,7 @@ class ThemeManager {
|
||||
*
|
||||
* Bevat o.a. default_template en achtergrondinstellingen.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return array Config-sectie, of lege array bij afwezigheid.
|
||||
*/
|
||||
@@ -128,7 +128,7 @@ class ThemeManager {
|
||||
*
|
||||
* Bevat de mapping van layout-key naar .twig-bestand.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return array<string,string> Layout-key => .twig-bestand mapping.
|
||||
*/
|
||||
@@ -150,7 +150,7 @@ class ThemeManager {
|
||||
* 2. Anders fallback naar config.default_template.
|
||||
* 3. Laatste veiligheidsnet: full_content.twig.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $layout Aangevraagde layout-key (bijv. 'left_sidebar').
|
||||
* @return string Templacenaam bruikbaar voor de Twig-loader.
|
||||
@@ -181,7 +181,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Geeft de lijst met beschikbare layout-keys uit de "template"-sectie.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return array<string> Lijst met layout-keys.
|
||||
*/
|
||||
@@ -192,7 +192,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Controleert of een templatebestand bestaat in de thema-map.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $file Bestandsnaam van het template (relatief t.o.v. thema-map).
|
||||
* @return bool True als het bestand bestaat.
|
||||
@@ -205,7 +205,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Rendert een layout-template met de gegeven data.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $layout Aangevraagde layout-key.
|
||||
* @param array $data Template-variabelen.
|
||||
@@ -224,7 +224,7 @@ class ThemeManager {
|
||||
* (0444) gezet om handmatige aanpassingen te voorkomen. Bij een fout
|
||||
* wordt deze gelogd en null teruggegeven.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param bool $force Forceer hercompilatie ongeacht de cache. Default false.
|
||||
* @return string|null Absoluut pad naar de gecompileerde CSS, of null bij fout/afwezigheid.
|
||||
@@ -282,7 +282,7 @@ class ThemeManager {
|
||||
* scssphp). Indien de gecompileerde CSS nog niet bestaat, wordt deze
|
||||
* alsnog gecompileerd.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string|null Publieke CSS-URL, of null indien niet beschikbaar.
|
||||
*/
|
||||
@@ -304,7 +304,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Geeft de publieke URL voor de thema-JS, of null indien niet beschikbaar.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string|null Publieke JS-URL, of null indien niet beschikbaar.
|
||||
*/
|
||||
@@ -319,7 +319,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Geeft de publieke URL voor een thema-asset.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @param string $assetPath Pad naar de asset binnen de assets/-map van het thema.
|
||||
* @return string Publieke URL in de vorm '/themes/<naam>/assets/<path>'.
|
||||
@@ -332,7 +332,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Controleert of het thema een SCSS-bronbestand heeft.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return bool True als assets/scss/theme.scss bestaat.
|
||||
*/
|
||||
@@ -343,7 +343,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Controleert of de gecompileerde CSS nieuwer is dan de SCSS-bron.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return bool True als de CSS-_mtime >= SCSS-mtime, anders false.
|
||||
*/
|
||||
@@ -361,7 +361,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Controleert of het thema een handmatig CSS-bestand heeft.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return bool True als assets/css/theme.css bestaat.
|
||||
*/
|
||||
@@ -374,7 +374,7 @@ class ThemeManager {
|
||||
*
|
||||
* De css_compiled-map wordt uitgesloten.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return array<string> Lijst met publieke CSS-URLs.
|
||||
*/
|
||||
@@ -399,7 +399,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Geeft een lijst met JS-bestanden in de assets/js/-map van het thema.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return array<string> Lijst met publieke JS-URLs.
|
||||
*/
|
||||
@@ -424,7 +424,7 @@ class ThemeManager {
|
||||
/**
|
||||
* Geeft de URL voor de favicon indien deze bestaat.
|
||||
*
|
||||
* @since 2.6.4
|
||||
* @since 2.6.5
|
||||
*
|
||||
* @return string|null Publieke favicon-URL, of null indien niet beschikbaar.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user