Skip to content

Dev#21

Closed
dannorthern wants to merge 13 commits intomainfrom
dev
Closed

Dev#21
dannorthern wants to merge 13 commits intomainfrom
dev

Conversation

@dannorthern
Copy link
Member

No description provided.

Added wp_utility_image_sizes filter to allow themes and plugins to completely override default image size definitions.
Added filters to provide full control over image setup configuration:
- wp_utility_max_srcset_width: customize maximum srcset width
- wp_utility_remove_default_sizes: control which WP default sizes to remove
- wp_utility_image_size_names: customize block editor display names
- Added check to prevent duplicate post-thumbnails support registration
Removed ForegroundImage, SectionBackground, and SectionPattern helpers as they belong in our framework, not in general utilities.
Refactored Component, Utility, and Helper classes to use explicit methods instead of __callStatic magic methods. This provides better IDE support, static analysis, and performance.

- Moved classes to their respective directories (Components/, Utilities/, Helpers/)
- Added explicit methods for all components and utilities
- Created backwards compatibility aliases
- Added snake_case support for all method calls
- Removed obsolete helper tests
Moved PostFeed logic directly into the post-feed block render file where it belongs. PostCard was simplified to a simple template part call. This eliminates unnecessary abstraction layers.
Updated class name from Init to App for consistency with the filename App.php.
Added customization filters:
- wp_utility_reading_time_wpm: customize words per minute for reading time calculation (default 200)
- wp_utility_lazy_load_non_lazy_parents: customize which parent blocks disable lazy loading
Added customization filters:
- wp_utility_pagination_args: customize paginate_links arguments
- wp_utility_pagination_wrapper: customize wrapper class and aria-label
- wp_utility_breadcrumb_open_nav: customize breadcrumb opening HTML
- wp_utility_breadcrumb_close_nav: customize breadcrumb closing HTML
Added filters to allow complete customization of breadcrumb HTML structure:
- wp_utility_breadcrumb_item: customize individual breadcrumb item HTML
- wp_utility_breadcrumb_separator: customize separator HTML

This allows changing from <ol>/<li> to other structures like <ul>/<li> or <div>/<span>
Added wp_utility_button_block_prefix filter to allow customizing the button class prefix. This decouples the Button component from Polaris-specific naming, making it usable in non-Polaris contexts.

Default remains 'wp-block-polaris-button' for backwards compatibility.
Added standardized file header comments across all PHP files in wp-utility:

- Utilities: Added headers describing purpose for CountryList, GetTitle,
  LazyLoadFirstBlock, ReadingTime, and StateList utilities
- Helpers: Added header for EscapeSvg helper
- Root aliases: Updated headers for Component, Helper, and Utility aliases
  to better describe their backward compatibility purpose
- Components: Added headers for AccessibleCard, Breadcrumbs, Button, and
  Pagination components

All headers follow WordPress documentation standards with package info,
descriptions, and version information.
Moved ImageSetup class to a dedicated Setup directory to better reflect
its purpose as a configuration/initialization class.

Changes:
- Created new Setup/ directory for configuration classes
- Moved ImageSetup to Setup/ with updated namespace
- Added backward compatibility alias in original location
- Updated internal references to use new namespace
- Maintained full backward compatibility - no breaking changes

Both namespaces now work:
- New: BuiltNorth\WPUtility\Setup\ImageSetup (recommended)
- Old: BuiltNorth\WPUtility\Utilities\ImageSetup (via alias)

This improves code organization while maintaining compatibility.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant