Add an option to configure the site icon in general settings#6064
Add an option to configure the site icon in general settings#6064aaronjorbin wants to merge 34 commits intoWordPress:trunkfrom
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. |
audrasjb
left a comment
There was a problem hiding this comment.
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.
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.
Sentence cased, technically.
| <?php if ( has_site_icon() ) : ?> | ||
| <?php _e( 'Change site icon' ); ?> | ||
| <?php else : ?> | ||
| <?php _e( 'Choose a Site Icon' ); ?> |
|
@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.
| } | |
| 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.
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.
the alt text is not translatable
|
This was closed in https://core.trac.wordpress.org/changeset/57602 |






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.