-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to configure the site icon in general settings #6064
base: trunk
Are you sure you want to change the base?
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN:
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I left two questions :)
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
id="js-remove-site-icon" | ||
<?php echo has_site_icon() ? 'class="button"' : 'class="button hidden"'; ?> | ||
> | ||
<?php _e( 'Remove Site Icon' ); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make casing consistent. I think 'site icon' should probably be lowercased in all instances, matching the 'Change site icon' text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sentence cased, technically.
<?php if ( has_site_icon() ) : ?> | ||
<?php _e( 'Change site icon' ); ?> | ||
<?php else : ?> | ||
<?php _e( 'Choose a Site Icon' ); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make casing consistent
@joedolson Thanks for the review. I think that consistency for casing is also going to involve tweaks to the site editor and the customizer since those are also inconsistent. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
I think the design of the remove button can be improved. Maybe the style of button that deletes a theme can be reused, which is red text as non hover, and white text with red background as hover state. Could be solved by:
|
Co-authored-by: Erik <11491369+kebbet@users.noreply.github.com>
border-color: transparent; | ||
box-shadow: none; | ||
background: transparent; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
margin-left: 10px; | |
} |
Co-authored-by: Pascal Birchler <pascal.birchler@gmail.com>
Co-authored-by: Pascal Birchler <pascal.birchler@gmail.com>
Strings: |
<div class="favicon-preview"> | ||
<img src="<?php echo esc_url( admin_url( 'images/' . ( is_rtl() ? 'browser-rtl.png' : 'browser.png' ) ) ); ?>" class="browser-preview" width="182" alt=""> | ||
<div class="favicon"> | ||
<img src="<?php site_icon_url(); ?>" alt="Preview as a browser icon"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the alt text is not translatable
</div> | ||
<span class="browser-title" aria-hidden="true"><?php echo get_bloginfo( 'name' ); ?></span> | ||
</div> | ||
<img class="app-icon-preview" src="<?php site_icon_url(); ?>" alt="Preview as an app icon"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the alt text is not translatable
Trac ticket: https://core.trac.wordpress.org/ticket/54370
This largely brings back code that was removed in https://core.trac.wordpress.org/changeset/33329 but it keeps everything on the same page rather than having a second flow just for site icon. This comes at the cost of no-js mode so the option is hidden from no-js users.
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.