Individual sticky footer banner#30
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors the sticky footer banner functionality by replacing a global sticky setting with individual banner-level sticky settings, while also updating the version and related UI elements for better control and backward compatibility.
- Breaking change: Removed global sticky setting and updated debug logs to reflect individual banner sticky behavior
- Enhancement: Added sticky setting controls for individual footer banners in both PHP settings and JavaScript UI updates
- Technical adjustment: Updated plugin version constants and documentation in CHANGELOG.md
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| iwz-banner-container-plugin.php | Updated version constants to reflect the new version |
| includes/class-iwz-banner-container.php | Removed global sticky setting and refactored debug logging for sticky |
| includes/class-iwz-banner-container-settings.php | Removed global sticky setting registration and added individual banner sticky controls |
| CHANGELOG.md | Updated changelog information to document breaking changes and enhancements |
| $alignment = $banner['alignment'] ?? get_option( 'iwz_banner_wp_footer_alignment', 'left' ); | ||
| $alignment = $banner['alignment'] ?? get_option( 'iwz_banner_wp_footer_alignment', 'left' ); | ||
| // Use ONLY individual banner sticky setting. | ||
| $sticky = isset( $banner['sticky'] ) ? $banner['sticky'] : false; |
There was a problem hiding this comment.
[nitpick] Consider using the null coalescing operator for improved readability, e.g., '$sticky = $banner['sticky'] ?? false;'.
Suggested change
| $sticky = isset( $banner['sticky'] ) ? $banner['sticky'] : false; | |
| $sticky = $banner['sticky'] ?? false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a breaking change to the sticky footer banner functionality in the
iwz-banner-container-plugin, transitioning from a global sticky setting to individual banner-level control. It also includes enhancements to the user interface, backward compatibility adjustments, and updates to the plugin's version.Breaking Changes:
CHANGELOG.md- [1]class-iwz-banner-container-settings.php- [2] [3]Enhancements:
class-iwz-banner-container-settings.php- [1] [2]sanitize_location_bannersfunction to handle the new individual sticky setting. (class-iwz-banner-container-settings.php- includes/class-iwz-banner-container-settings.phpR344-R348)class-iwz-banner-container.php- includes/class-iwz-banner-container.phpR325-R332)Technical Adjustments:
display_footer_bannerfunction to remove dependencies on the global sticky setting and use only the individual banner sticky settings. (class-iwz-banner-container.php- [1] [2]1.9.6and documented the changes in theCHANGELOG.mdfile. (iwz-banner-container-plugin.php- [1] [2]CHANGELOG.md- [3]