Releases: timnarr/kirby-helpers
Releases · timnarr/kirby-helpers
v1.3.0
v1.2.0
Added
- ensureHashed() field method: New field method to ensure a string starts with a hash (#). This complements the existing ensureLeft() and ensureRight() methods for consistent string formatting.
- getUsedBlockTypes() function: Extract all used block types from a Blocks object or array of blocks. Useful for conditional CSS loading based on which blocks are used on a page. Returns an array of unique block type strings.
Changed
- Updated README documentation
- Updated composer.json
Full Changelog: v1.1.0...v1.2.0
v1.1.0
Added
Field Methods:
autoLinkTitles(): Automatically addstitleattributes to links if not already present. Thetitlevalue is generated from thehrefattribute.
Helper Functions:
autoLinkTitles(): Processes HTML string and automatically adds title attributes to all tags (if not already present)getMissingTranslations(): Returns an array of language codes for which the page translation does not exist
Page Methods:
getMissingTranslations(): Get missing translations for a pagemissingTranslationsBadge(): Generate a Kirby Panel info badge showing translation status (green badge if all translations exist, red badge with missing language codes)
Changed
- Field methods (ensureLeft(), ensureRight(), autoLinkTitles()) now return a Field object instead of a string, enabling method chaining
- Updated and expanded documentation in README.md
Full Changelog: v1.0.0...v1.1.0
v1.0.0
Added
- Error handling with try-catch blocks for improved stability
- SVG sanitization in
readAccessible()function for enhanced security - Path traversal protection in
inlineViteAsset()for security hardening - Static caching to
isViteDevMode()function for better performance
Fixed
- Use imported
Strclass inbuildMailtoLink() - Rename named argument for consistency
- Improve type casting in
inlineViteAsset() - Improve type casting in
cssIfTemplate() - Check if
incrementHeadingLevel()not exists before usage - Extract heading level validation into separate function
- Use named arguments consistently for Html methods
- Optimize array iteration in
shouldIgnorePageFromCache() - Add missing echo statements in
cssIfBlock()andcssIfTemplate() - Improve readability of
linkLabel()function - Simplify
setBlankIfExternal()function
Changed
- Improve
buildMailtoLink()documentation - Improve
cssLazy()documentation - Update README.md documentation
Full Changelog: v0.5.0...v1.0.0
v0.5.0
- Add new
incrementHeadingLevel()helper to increment or decrement a heading level by a specified number of steps - Add new
buildMailtoLink()helper to build a mailto link with optional subject and body parameters
Full Changelog: v0.4.0...v0.5.0
v0.4.0
- Add new
readAccessible()file method to reads the SVG content and adds accessibility attributes
Full Changelog: v0.3.5...v0.4.0
v0.3.5
Full Changelog: v0.3.4...v0.3.5
v0.3.4
Full Changelog: v0.3.3...v0.3.4
v0.3.3
Full Changelog: v0.3.2...v0.3.3
v0.3.2
Full Changelog: v0.3.0...v0.3.2