feat: add an avatar size control for author bios#2647
Open
laurelfulford wants to merge 2 commits intotrunkfrom
Open
feat: add an avatar size control for author bios#2647laurelfulford wants to merge 2 commits intotrunkfrom
laurelfulford wants to merge 2 commits intotrunkfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Customizer control to configure the requested author avatar image size, and applies it consistently across author bio templates and author archives to support more flexible design needs in Newspack themes.
Changes:
- Introduces a new
author_avatar_sizetheme mod (default 120px) in the Customizer under Author Bio Settings. - Updates avatar retrieval in the Newspack and Newspack Sacha author bio templates to use the new setting.
- Updates author archive header avatars to use the new setting.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
newspack-theme/template-parts/post/author-bio.php |
Uses author_avatar_size when requesting author avatars in single post author bio output. |
newspack-theme/inc/customizer.php |
Adds the Customizer setting/control for author_avatar_size (default 120). |
newspack-theme/archive.php |
Uses author_avatar_size when requesting author avatars on author archive headers. |
newspack-sacha/template-parts/post/author-bio.php |
Mirrors the author bio avatar-size behavior for the Sacha child theme. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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.
All Submissions:
Changes proposed in this Pull Request:
This is a belated avatar size control for the theme to fix a wall I keep running into building some designs. It changes the avatar size in both the single post footer and on the author archive pages, in addition to CSS also controlling the image size. It sets the default to 120px, but should still display as 80px on single posts.
How to test the changes in this Pull Request:
Other information: